The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Java Code
Posted by: newb | January 18, 2011 @ 1:57pm
Java Code
[
Download
]
$(document).ready -> data = new gfdata() results = data.getPositions() class gfdata @positions = [] setupMyService: -> myService = new google.gdata.finance.FinanceService('tvb-dashboard-1') return myService positionCallback: (result) => entries = result.feed.entry @positions.push entries loopbody = (entry) => data = entry.getPositionData() position={name:entry.getTitle().getText(),shares:data.getShares()} @positions.push position loopbody entry for entry in entries handleError: (error) -> alert(error) getPositions: -> scope = "http://finance.google.com/finance/feeds/" token = google.accounts.user.login(scope) feed_service = this.setupMyService() portfolio_id = 11 feed_uri = 'http://finance.google.com/finance/feeds/default/' + 'portfolios/' + portfolio_id + '/positions?returns=true' feed_service.getPositionFeed(feed_uri, this.positionCallback, this.handleError) return this.positions
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.51 / 8
77 Votes