Archive for March, 2011

Reduce your internet Dropbox bandwidth using `Selective Sync`

When we use Dropbox, with large files, synchronization between the client and server is quite slow. Dropbox now supports storage on server without synchronization on client, i.e. we can choose which files/folders to be synchronized.

First right click icon dropbox in system tray, select click `Preferences…`

1

Then, select ` Advanced` and click button `Selective Sync…`

2

Then, uncheck those folders that you don’t want to sync to client and click button `Update` to finish.

3

Hope that helps!

Nam.

How to get a sharable link of a file in `dropbox`?

How did I know this?

The screenshot show you how.

get-sharable-dropbox-link

Note: If you don’t have this feature in your `dropbox` menu, you need to follow “All you have to do is enable your account by clicking this link

Hope that helps!

Nam.

How to update all attributes’ value of your XML data column using T-SQL

How did I know this?

Let’s have a sample snippet

   1: DECLARE @xml XML = N'

   2: <a abb="122">

   3:     <b>

   4:     </b>

   5: </a>

   6: <a abb="344">

   7:     <b>

   8:     </b>

   9: </a>

  10: '

We need ​​to update all attribute ‘abb’ of ‘a’ tag with value 888 We can do the following:

   1: set @xml.modify('replace value of (/a/@abb)[1] with 888')

   2: set @xml.modify('replace value of (/a/@abb)[2] with 888')

By doing so we can solve the above requirement. But in  such case, the data doesn’t have 2 ‘a’ tag, i.e there are > 2 positions to update, that doesn’t help work. We must have  a different way which can deal with a dynamic number N of  ‘a’ tags, i.e we don’t  know N value before. The idea to do that is the following: Split the XML ‘a’ tag into rows of  a temp table (e.g. a table variable), replace each node separately and then combine them again.

   1: --  declare variable @T type table 

   2: declare @T table (XMLCol xml)

   3:

   4: -- spilit xml insert to table

   5: insert into @T

   6: select

   7:   XMLTable.data.query('.')

   8: from @xml.nodes('a') as XMLTable(data)

   9:

  10: -- Update all rows 

  11: update @T set

  12:   XMLCol.modify(N'

  13:                 replace value of (/a/@abb)[1]

  14:                 with 888

  15:         ')

  16:

  17: -- Combine all rows into xml

  18: set @xml = (select XMLCol as [*]

  19:             from @T

  20:             for xml path(''))

Download demo here

Hope that this post is useful for you!

Nhu & Nam.

tsql – Is it possible to write t-sql script to show all changes made to the database rows recently? – Stack Overflow

tsql – Is it possible to write t-sql script to show all changes made to the database rows recently? – Stack Overflow.

How to set `Internet Explorer` to be run when executing an ASP.Net project

How did I know this?

As a Chrome browser fan, my default system web browser is Chrome.

This leads me to a bothering experience when developing web on ASP.Net technology – when running an ASP.Net project, Chrome always opened to run. This is not preferred to run an ASP.Net web page from Internet Explorer (IE) since the technology is optimized for that browser.

So, what I need is 1) to keep still the OS’s default browser to be Chrome and 2) the browser automatically-run when executed from Visual Studio IDE is IE. Here’s how.

First right click a page

image

Then, select `Browse With…`

image

Then, select IE and set it as the default browser

image

Hope it is helpful to you!

Nam.

Quickly Access an TFS item using `Work-Item Tracking` in Visual Studio 2010

Normally, to access a work-item in TFS, we must select Work Items node, choose the queries containing the list of work-item, then find that work-item.

2011-03-15 10h56_45

Since doing so is very time-consuming especially when the number of work-items is large, or the tfs server is slow etc.

In Visual Studio 2010 can support the Work-Item Tracking toolbar for quick access to work-items by their IDs without having to make many steps as above.

Steps

Step 1:

Right click an empty space on menu bar in VS 2010

2011-03-10 17h43_44

Step 2:

You must be logged TFS

Click arrow button or
Select the TFS queries node and press Ctrl + G.

2011-03-13 16h06_45

Type the ID of the task needs access.

2011-03-15 11h12_53

And you will see your item opened.

Capture

Hope that this post is useful for you!

Nhu.

Display the bookmark bar in Adobe Reader

You follow the steps in the following guidance:

How to open bookmarks in Adobe Reader

Hope that you would find this helpful!

Nhu.