Thursday, December 17, 2015

Links from TD

How can I know in which content database my site collection is stored?

http://sharepoint.stackexchange.com/questions/105150/how-can-i-know-in-which-content-database-my-site-collection-is-stored

Follow these steps:
  1. Open Central Administration.
  2. Application Management.
  3. View all site collections.
  4. Select the site collection you need to get the database name.
  5. In the panel on the right you should see "Database Name", that's the name of the content database.

Sunday, March 22, 2015

Financial terms

Options
Financial derivative that represents a contract sold by one party (option writer) to another party         (option holder). The contract offers the buyer the right, but not obligation, to buy (call) or sell (put) security of   other financial asserts at agreed-upon price (the strike price) during a certain period of time or on specific date (exercise date)


Bond
Bond is a debt investing in which an investor lends a loan to an entity (typically company or governmental ) which borrows money for a defined period of time at variable and fixed interest rate. Bonds are used by companies, municipalities, states and sovereign countries to raise funds and finance variety of project and activities.  Owners of bonds are debtholder or creditors of issuers.

Swap
Traditionally swap was an exchange one security to another to change maturity date (bond), quality of issues (stock or bond), or because financial objectives have been changed. Recently, swaps have been grown to include currencies swap and interest rates swap.

Ex. Assume company A is a new company with low credit rate. It got a loan of 5m at floating rate of 5%. Now assume that company B is a company with a good credit rate that got a loan of 5m at fixed rate 6%. Because rate is now 4% swap between A and B would benefit both companies.

Monday, February 9, 2015

What does it mean %* in batch file

%*will return the remainder of the command line starting at the first command line argument (in Windows NT 4, %* also includes all leading spaces)

see Command line parameters

When would you like to use it?One scenario is when you want first to check if util exists and then invoke it with
parameters passed to batch file

Batch file build.cmd
@ECHO OFF
setlocal

set PSakeVersion="4.3.1.0"
set PackagesRoot=%~dp0\..\Source\packages

set PSake=%PackagesRoot%\psake.%PSakeVersion%\tools\psake.cmd
if defined NuGet (
    set NuGet="-nuget %NuGet%"
)

rem check if PSake is downloaded
if not exist %PSake% (
   echo Unable to download PSake using nuget
   goto :EOF
)

echo Invoking PSake build...

%PSake% %~dp0\build.ps1 -framework "4.0" %*


calling batch.cmd
call .\Build\build.cmd PublishBuild -parameters "@{projectName='%ProjectName%';slnName='%SlnName%';platform='%BuildPlatform%';buildConfiguration='%BuildConfiguration%';xsBuildLabel='%system.build.number%';tfExePath='%TFExe%';TeamProjectCollection='$TeamProjectCollection%IsPreRelease%'}" -properties "@{nugetExePath='%env.NuGet%';msbuildLogger='%MSBuildLogger%'}"

It first check if PSake is installed and then run

%PSake% %~dp0\build.ps1 -framework "4.0" @{projectName='%ProjectName%';slnName='%SlnName%';platform='%BuildPlatform%';buildConfiguration='%BuildConfiguration%';xsBuildLabel='%system.build.number%';tfExePath='%TFExe%';TeamProjectCollection='$TeamProjectCollection%IsPreRelease%'}" -properties "@{nugetExePath='%env.NuGet%';msbuildLogger='%MSBuildLogger%'}

Monday, February 2, 2015

Useful powershell command let

Get-Acl 
retrieves security descriptor (access control list) to file, folder or even register key.
e.g.  Get-Acl c:/scropts.txt | Format-List
for more details see https://technet.microsoft.com/en-us/library/ee176838.aspx
       

How to get users belongs to a given User Group?

Use tool from microsoft, named Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1)
http://www.microsoft.com/en-ca/download/details.aspx?id=7887