Tuesday, May 13, 2014

Synchronize Class View in Visual Studio 2010

1. Tools->Options->Environment->Keyboard and
2. bound Ctrl+Shift+C to View.SynchronizeClassView in Text Editor view. 

http://stackoverflow.com/questions/546113/visual-studio-automatically-refresh-class-view-when-changing-class

Monday, May 12, 2014

Todo in Visual Studio 2010

1. Resharper>Tools>To-do Items list all todo items
2. Reshaper>Options set what to show in todo items

for me I create //MyTodo:...

3. To view only MyTodo: Using (1), in the filter choose MyTodo



Wednesday, May 7, 2014

Running 32 bit DLL on 64 bit Machine on Visual Studio

Solution:
1. Right click the Solution>Configuration Manager

2. In the Active solution platform, Choose <New>, under Copy Settings from, choose x86, click ok.
(ALL projects need to be compile under X86)

3. Make sure Build for all projects are checked.

P/S: If you have the problem on Visual Studio 2010 during compilation: Could not load file or assembly … or one of its dependencies. An attempt was made to load a program with an incorrect format (.resx file), use the following method to solve it.

1. Close all instances of Visual Studio.

2. From the Visual Studio Tools subfolder, open an elevated “Visual Studio Command Prompt (2010)” (using “Run as administrator” option). Change directory to "<system_drive>:\Program Files (x86)\Microsoft SDKs\Windows\v<x.xx>\bin\”.

3. Issue the command :

corflags /32bit+ ResGen.exe /force

4. Open <project_name>.csproj in notepad.

5. Add the following property <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture> under the PropertyGroup section. Save and close the csproj file.

From: http://support.microsoft.com/kb/2028833

Friday, May 2, 2014

How to refer to labels in other documents?

How to refer to labels in other documents? 

\usepackage{xr}
\externaldocument{supplement}
...
\ref{ext:supplement}
http://tex.stackexchange.com/questions/160140/how-to-refer-to-labels-in-other-documents

How to remove the link
http://tex.stackexchange.com/questions/118182/selectively-turn-off-hyperref-links-for-citations

Tuesday, April 29, 2014

Remove white and black backgrounds in photoshop

Today I have a fairly quick Photoshop tip on how to remove white or black backgrounds from images in Photoshop to create areas of transparency. There are several ways to do this, you could use the magic eraser, or just make a selection of the white or black background and then delete it, but I want to show you how to use a blending slider to do it. As well as the blending modes available in the Layers palette, you can play around with blending sliders in the Layer Style dialog box. Let’s get started.
1. Open an image in Photoshop with a predominantly white or black background.
2. Open the Layer Style dialog box by doing one of the following:
  • Click the little fx button at the bottom of the Layers panel and choose Blending Options.
  • Double-click its layer thumbnail in the Layers panel.
  • Choose Layer > Layer Style > Blending Options.
Note: The Blending sliders won’t work on a locked Background layer; you have to double-click the layer first to make it editable.

At the bottom of the resulting dialog box, you’ll see two pairs of sliders-one set for the This Layer bar and another for the Underlying Layer bar. Each of these sliders lets you make parts of your image transparent based on the brightness value of the pixels. The left slider represents the shadows (blacks) in your image and the right one represents the highlights (whites). If you want to change the background of the currently active layer, then tweak the This Layer slider.
3. If you want to hide a white background, drag the highlight slider (the one on the right) toward the middle until the white part is transparent.
As you drag, you’ll see the white areas of the image disappear and the checkerboard pattern (or underlying layer) will appear. Note that any white area will disappear so you need to be careful how far you drag.
Likewise, if the background of your currently active layer is black and the subject (or object in the foreground) is much brighter, you can hide the black part by dragging the shadow slider (the one on the left) toward the middle until the black part is transparent. Very easy and quick.
If you’re keen to learn more about Photoshop, you may find this recent article on getting started with Photoshop of great interest.


Sunday, April 27, 2014

What is the difference between functional and Non-functional requirements

For a software system, there are two kinds of requirements, i.e., Functional and Non-functional Requirements.
Functional Requirements: specify the functionality of the system.
Non-functional Requirements: specify the quality of the system,  is mostly related to the satisfiability of the user.
We use a simplistic Travel Agency Service (TAS) as an example to illustrate the concept. The workflow of the TBS is described as follows. When the request from the user is received, it invokes the other two services based on the request of the user. If the user prefers to Travel by Road, then the Car Booking Service (CBS) is invoked, otherwise if the user prefers to travel by flight, the Flight Booking Service (FBS) is invoked. Subsequently, Hotel Booking Service (HBS) is invoked for booking a hotel for the user, and then the result of the bookings are replied to the user.
In such scenario, the functional requirements of TAS could be:
1) When Travel By Road is chosen, then the CBS will always be invoked.
2) When Travel By Air is chosen, then the FBS will always be invoked.
3) HBS will only be invoked after either CBS or FBS is invoked.
4) HBS and FBS – exactly one of them would be invoked for each request.
etc.
The non-functional requirement of TAS would be
1) TAS responds to users within 3 seconds.
2) The availability of TAS is 99.999%.
etc.
As you can see non-functional is mostly related to the satisfiability of the user; therefore it is often an important clause in service-level agreements (SLAs), which is the contractual basis between service consumers and service providers on the expected Quality of Service (QoS) level.  For example, the SLAs of Amazon.com can be found here.
There are many other non-functional requirement attributes (e.g., Throughput, Latency Time), a more complete list could be found here: http://en.wikipedia.org/wiki/Non-functional_requirement.