Wednesday, July 23, 2008

Subversion and Maven release plugin

Hi,

I faced a unique problem while using mavne release plugin with subversion. ( though it has nothing to do specifically with subversion I believe ).

I used to check-out codebase from subversion using url like : svn://myrepository/mycode/trunk

... where myrepository is the hostname without fully qualified domain info.

Because of policy change in network administration, It was made compulsory to use fully qualified host name with domain information. Because of this reason I changed location of repository in declaration within my pom file to svn://myrepostiory.domain.net/mycode/trunk

After updating pom with this information, maven release:prepare started giving error like "Can't get password", though dryRun worked fine.

Finally we realised that codebase was checked-out with "guest" user by default and hidden svn metadata files were still pointing to svn://myrepository/mycode/trunk.

Solution to this problem was to checkout the code again with correct url having domain info included and then submitting a file with a minor change ( i.e. just add an extra space somewhere in pom ). This will again ask for username and password for subversion and will be cached for use by maven release plugin.

- Dipak

Wednesday, February 13, 2008

Hedging Strategy with Derivatives

Purpose of this blog is to invite discussions on what can be the best trading strategy....

Let's say I am expecting market to go bullish in one month on a perticular stock 'X'.

Current price of stock 'X' is INR 100.

Strategy 1 :

I'll buy 100 'X' at 150 on month end - future contract ( Cost : 250 INR )
I'll may sell 100'X' at 155 on month end - option ( Cost: 250 INR )

* Scenario 1 : On month end - price of 'X' is INR 170.

1. Exercise future and buy 100 'X' at 150.
2. Sell these'X' at 170 and make profit of 2000.
3. Subtract cost of future and option from profit ( 2000 - 500 ) - 1500 net profit.

** Scenario 2 : On month end - price of 'X' is INR 130.

1. Exercise future and buy 100 rpl at 150
2. Exercise option and sell 100 rpl at 155
3. No Profit No Loss.


Stretegy 2 :

If I am expecting market to go bearish, I'll sell 100 'X' for 150 on month end ( future ) and
I'll may buy 100 'X' on month end at 145 ( option ).


.....



Thoughts on these strategies ? What are the pros and cons ? Any better ideas ???

Tuesday, June 12, 2007

HTTP DELETE on IIS

I came across a requirement to delete files from the web application folder hosted on the IIS in intranet environment.

By default IIS does not allow to delete files from the web application folder through HTTP DELETE request.

To enable delete, there must be "modify" permission given to the user account who has access to web application. By default "IUSR_machinename" windows account has anonymous access to web application in IIS. You must have to give "modify" permission to this acccount on the web application folder.

That's it !!!!! You are ready to send HTTP DELETE requests.