Wednesday 26 October 2016

Displaying image for branding site

We got a common site and then branding sites, One of the site wants to show the image before a particular text and other didn't want to show that image at all.

Solution:

Update the common site to have a Div or Span and specify css class on it place this span before the text, e.g.

<span class="summaryimage"></span> Some text is shown here

now in CSS class specify

span.summaryimage{
background: url(http://url of the image) no-repeat 96% 96%;
float: left;
}


Syntax: background: <background-color> | <background-image> | <background-repeat> | <background-attachment> | <background-position>

http://www.htmlgoodies.com/beyond/css/article.php/3868361

background-color: white;
background-image: url(logo.gif);
background-position: 50% 50%;
background-repeat: no-repeat;
background-attachment: fixed;
And change it to this:
background: white url(log.gif) no-repeat fixed 50% 50%;

Friday 21 October 2016

Revert bad checkin in tfs

Problem:
When working on one of the project I checked in some wrong code and relaised that I need to rollback to previous version.

Solution:

Right click the folder/file (the one to revert) and click view history and find the last changeset number you like to revert to. Open Visual Studio Command Prompt (Run as administrator) and write the following command

Preferred (worked for me)

tf rollback /toversion:C<<write your previous changeset number you like to rever to>> /recursive <<path to folder>>

e.g.
tf rollback /toversion:C378 /recursive c:\tfs\dev1\projectxyz

(use . to use the current working space for this)


tf rollback /changeset: <<write your previous changeset number you like to revert to>>

e.g.

tf rollback /changeset:378