0 Comments
What is the difference between $(document).ready() and $(window).load()?

The $(document).ready() starts when the page has been loaded.

The $(window).load() starts later, when the window has been loaded, this means the page including the images, frames and objects.

In case your code is about images, you best choose for the later one. When your code has nothing to do with images/frames/objects you best choose the first one.

you can test it with the following code:

$(document).ready(function() {
 // executes when HTML-Document is loaded and DOM is ready
 alert("document is ready");
});


$(window).load(function() {
 // executes when complete page is fully loaded, including all frames, objects and images
 alert("window is loaded");
});

0 Comments
When you want to clear the log file for your SQL Server database to, for example, use it on a developers pc. The chances are high that the database from the production environment isn't using the 'Simple' recovery  model. This means there are log backups, which can have the log file grow enormously.

So first revert the database to simple recovery mode:

USE master ;
ALTER DATABASE [YourDBName] SET RECOVERY Simple ;

Shrink the database log file to a specified target size:

USE [YourDbName];
GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE ([YourLogFileName], 1);
GO

More info can be found here.

0 Comments

The working relationship between web developers, web designers and graphical designers can be pretty frustrating . This is because the designer creates something which will be valued by taste. And the more people involved the more debate about it (most if the time). The graphical designer can't change the website, so people tend to ask for changes to the web designer or developer because they can.

First of all we need to take a look at the basics. How the responsibilities should be divided over the web developers, web designers and the graphic designers.

The basics:

  • A graphical designer creates designs and the result is an image.
  • A web designer converts an image/design to Html.
  • A graphical designer is responsible for the design.
  • A web designer is responsible for the webpage. Is it looking accordingly to the design, is it behaving accordingly to the design?
  • A web developer implements the created web design into the website and adds the server side functionality.

I think the workflow should look like this:

  1. Graphic designer releases the design
  2. web designer presents design
  3. web designer starts working
  4. Design change request  =>
    a. The request goes to the designer
    b. The designer releases the updated design
    c. The designer presents design
    d. web designer changes his design to the latest one
  5. web designer  finishes his work and reviews it with the designer  =>
    a. web designer makes the adjustments where needed
  6. The webpage will be released by the developer
  7. The testing will start
    a. web designer makes the adjustments where needed
  8. The web developer starts implementing  server side functionality

The process in step 4, 5 and 7 can go over and over again.

Some known pitfalls:

  • People who aren’t designer shouldn’t change the design without having the designer reviewing it.
  • People who want to change the design have to talk with the designer, not with the web developer.
  • The designer should release a new version when he’s ready. The developer will only make changes to the design when the designer releases a new version.

When the responsibilities are clear and known, it's only discipline (leadership) which will keep everything running smoothly.

0 Comments
  •   Posted in: 
  • GIT
A nice feature of GIT when working in a collaborative environment is preventing detection of changes for a specific file.

Prevent detection:
git update-index --assume-unchanged [path]
Turn it on again:
git update-index --no-assume-unchanged [path]


The path name is case sensitive!


You can still pull the changes from the server. Getting a list of the ignored files, I couldn't make it happen. 


0 Comments

If your web project doesn't load in Visual Studio with the error beneath, I might have a solution.

Error:
'Creation of the virtual directory http://localhost:xxxx failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.'

First you have to try these:
1. Running Visual Studio as Administrator
2. Running aspnet_regiis.exe -ga MyUserName
3. Running aspnet_regiis.exe -I
4. Checked security here: %systemroot%\System32\inetsrv\config 

Maybe there is something wrong with the settings of Visual Studio.

Check if this setting has a correct path:
 

And check these 3 path settings too: