Monthly Archives: November 2013

SQLite.NET for WInRT 8.1

After upgrading to VS 2013 and upgrading my app to Windows 8.1 platform, I ran into a problem with the SQLite package used by my app.  Seems like it’s not ready to be used with Windows 8.1 Apps.  Error is

https://i0.wp.com/www.lyalin.com/wp-content/uploads/2013/07/clip_image0024.jpg

A Beta package, however, exists.

See these links for more information:

http://social.msdn.microsoft.com/forums/windowsazure/fr-fr/0c8649dc-ccf6-4680-b628-93eb51242a04/using-sqlite-in-windows-81

http://www.lyalin.com/2013/07/09/sqlite-for-windows-runtime-for-windows-8-1-apps/

Advertisements

Debugging VS2012 Apps on Windows RT 8.1

After upgrading my tablet to Windows RT 8.1, I suddenly lost ability to run my ARM Remote debugger. Attempting to launch it was giving me a message complaining that Windows cannot verify the digital signature for this file.

So I installed VS 2013 remote debugger, which did not work with my VS 2012 on the dev box. After feverishly searching the web for the solution, I found a site to download Remote Tools for Visual Studio 2012 Update 4. Wish I knew this before upgrading.

http://www.microsoft.com/en-us/download/details.aspx?id=38184

Using Yahoo Finance API in Excel

I was using Excel to model my retirement portfolio and wanted to get the stock prices from the web. Found a bunch of helpful links, which I will share below, but for a simple close price, I used a VBA function to pull the close price from Yahoo Finance API. Add it to the module, not class module, to use it from any excel sheet.

Option Explicit

Function StockQuote(ByVal ticker As String) As Double
Dim url As String
Dim closePrice As Double
Dim http As Object

    ' Compile the request URL with start date and end date
    url = "http://download.finance.yahoo.com/d/quotes.csv?s=" & ticker & "&f=l1"

    Set http = CreateObject("MSXML2.XMLHTTP")
    http.Open "GET", url, False
    http.Send

    StockQuote = http.responseText
    Set http = Nothing
End Function

You can read up on this API here: http://code.google.com/p/yahoo-finance-managed/wiki/csvQuotesDownload.

How to use

Use a function like any standard Excel function from any cell. Refer to another cell for the ticker value or pass a hardcoded string.

Excel1

Press enter and…

Excel1

Links to sources:

  1. API documentation on google code
  2. Video Tutorial by DontFretBred
  3. Using the Yahoo Finance API for CSV
  4. Detailed API documentation by Clif Ngan