Friday, April 27, 2012

Yahoo Finance API in Python 3.2


This is a sample code to fetch market data from yahoo finance.

Output :-
Unsorted :
Ask  =>  117.25
Bid  =>  116.25
Change  =>  -3.60
Trade Date  =>  -
52-week Low  =>  111.20
Change From 52-week Low  =>  +5.05
Percebt Change From 52-week High  =>  -48.28%
Open  =>  120.65
Change in Percent  =>  "-3.00%"
Ex-Dividend Date  =>  "14-Sep-11"
Day's Low  =>  115.55
52-week High  =>  224.75
Percent Change From 52-week Low  =>  +4.54%
Last Trade Size  =>  1
Previous Close  =>  119.85
Symbol  =>  "HINDALCO.NS"
Last Trade Time  =>  "6:29am"
Last Trade Date  =>  "4/26/2012"
Day's High  =>  121.15
Change From 52-week High  =>  -108.50
Last Trade (Price Only)  =>  116.25
Volume  =>  10257747
Stock Exchange  =>  "NSE"

Sunday, April 15, 2012

Recursive Merge Sort in C++



Output :-
Unsorted :
308  259  354  738  444  7  891  756  63  56  460  961  732  38  648
Sorted :
7  38  56  63  259  308  354  444  460  648  732  738  756  891  961

Saturday, April 14, 2012

Union and Intersection of two Linked Lists in C++



Output :-
List1 : 78  19  12  30  10
List2 : 89  19  121  30
Union List : 89  121  10  30  12  19  78
Intercestion List : 30  19

Sunday, April 1, 2012

non-type template-parameter

A non-type template-parameter shall have one of the following (optionally cv-qualified) types:
  • integral or enumeration type,
  • pointer to object or pointer to function,
  • lvalue reference to object or lvalue reference to function,
  • pointer to member,
  • std::nullptr_t.