This release contains some new additions of hymns.
- Rejoice, O Pilgrim Throng
- Were You There?
- Within the Father’s House
- The Lord’s My Shepherd and
- a second translation of A Mighty Fortress Is Our God, using the isorhythmic version of the tune.
This release contains some new additions of hymns.
msdn gives quick start to upload image file using background transfer. but I was looking for way to upload image file using WinJS.xhr() in the javascript app.
Windows.Storage.Pickers.FileOpenPicker.pickSingleFileAsync() returns StorageFille object whereas WinJS.xhr.send() expects a File DOM object. Essentially, what we need is way to get a w3c File DOM object out of StorageFile object. I found finally the method MsApp.createFileFromStorageFile() to do that.
// url needs to be SAS (shared access signature) url for the blob when the container is protected // otherwise - it requires putting authorization code in the request. I have talked about in previous post. // but if the javascript is in the client side - you wont like to put your client secret in the app. // hence, you need to have some mechanism (your service) to return the sas url for your azure container/blob. var url = ''; var date = new Date().toGMTString().replace('UTC', 'GMT'); var data = MSApp.createFileFromStorageFile(storageFile); var xhrOptions = { type: 'PUT', url: blobSasUrl, headers: { 'Content-Type': 'image/jpeg', 'Content-Length': data.size, 'x-ms-date': date, 'x-ms-version': '2009-09-19', 'x-ms-blob-type': 'BlockBlob', }, data: data, }; WinJS.xhr(options).then(null, function onerror(error) { // handle error });
I see that many of us need to upload images to azure blob containers. If you are one of us, it will help to know little bit more to help you better.
I need to put a blob into azure from my windows store app that is being coded in javascript. I did not find azure javascript client lib. Azure does have nodejs sdk but did not find azure javascript client lib. Hence, I coded up my first put blob rest api call. The most tricky part in the code is to generate the authorization shared key. Rest is simply adding properties into XHR call options parameters.
Refer the code below.
var url = 'http://mystorageaccount.blob.core.windows.net/mycontainer/myblob'; var date = new Date().toGMTString().replace('UTC', 'GMT'); var xhrOptions = { type: 'PUT', url: url, headers: { 'Content-Type': 'application/octet-stream', 'Content-Length': contentLength, 'x-ms-date': date, 'x-ms-version': '2009-09-19', 'x-ms-blob-type': 'BlockBlob', data: data } }; var options = { storageAccount: 'mystorageaccount', resourcePath: 'mycontainer/myblob', primaryKey: 'myprimarykey' }; var authorizationHeaderValue = authorizationHeader.compute(options, xhrOptions); xhrOptions.headers.Authorization = authorizationHeaderValue; WinJS.xhr(xhrOptions).done(function oncomplete(req) { }, function onerror(error) { }); var authorizationHeader = { /* options - refer call to this method xhrOptions - parameter for the WinJS.xhr call. computed Authorization header will be used this xhr request only. */ compute: function compute(options, xhrOptions) { var sig = this._computeSignature(options, xhrOptions); var result = 'SharedKey ' + options.storageAccount + ':' + sig; return result; }, _computeSignature: function computeSignature(options, xhrOptions) { var sigString = this._getSignatureString(options, xhrOptions); var key = CryptoJS.enc.Base64.parse(options.primaryKey); var hmac = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); hmac.update(sigString); var hash = hmac.finalize(); var result = hash.toString(CryptoJS.enc.Base64); return result; }, _getHeaderOrDefault: function getHeaderOrDefault(headers, headerName) { var result = headers[headerName]; result = result ? result : ''; return result; }, _getSignatureString: function createSignatureString(options, xhrOptions) { var headers = xhrOptions.headers; var httpVerb = xhrOptions.type.toUpperCase(); var sigItems = []; sigItems.push(httpVerb); var contentEncoding = this._getHeaderOrDefault(headers, 'Content-Encoding'); sigItems.push(contentEncoding); var contentLanguage = this._getHeaderOrDefault(headers, 'Content-Language'); sigItems.push(contentLanguage); var contentLength = this._getHeaderOrDefault(headers, 'Content-Length'); sigItems.push(contentLength); var contentMD5 = this._getHeaderOrDefault(headers, 'Content-MD5'); sigItems.push(contentMD5); var contentType = this._getHeaderOrDefault(headers, 'Content-Type'); sigItems.push(contentType); var date = this._getHeaderOrDefault(headers, 'Date'); sigItems.push(date); var ifModifiedSince = this._getHeaderOrDefault(headers, 'If-Modified-Since'); sigItems.push(ifModifiedSince); var ifMatch = this._getHeaderOrDefault(headers, 'If-Match'); sigItems.push(ifMatch); var ifNoneMatch = this._getHeaderOrDefault(headers, 'If-None-Match'); sigItems.push(ifNoneMatch); var ifUnmodifiedSince = this._getHeaderOrDefault(headers, 'If-Unmodified-Since'); sigItems.push(ifUnmodifiedSince); var range = this._getHeaderOrDefault(headers, 'Range'); sigItems.push(range); var canonicalizedHeadersString = this._getCanonicalizedHeadersString(xhrOptions); sigItems.push(canonicalizedHeadersString); var canonicalizedResource = this._getCanonicalizedResource(options); sigItems.push(canonicalizedResource); var result = sigItems.join('\n'); return result; }, _getCanonicalizedHeadersString: function getCanonicalizedHeadersString(xhrOptions) { var headers = xhrOptions.headers; var headerNames = Object.keys(headers); var lowercaseHeaderNames = headerNames.map(function tolower(name) { return name.toLowerCase(); }); var msHeaderNames = lowercaseHeaderNames.filter(function isMsHeader(name) { if (name.indexOf('x-ms-') == 0) return true; else return false; }); msHeaderNames.sort(); var strItems = []; for (var i = 0; i < msHeaderNames.length; i++) { var key = msHeaderNames[i]; var value = headers[key] || ''; value = value.trim(); var item = key + ':' + value; strItems.push(item); } var result = strItems.join('\n'); return result; }, _getCanonicalizedResource: function getCanonicalizedResource(options) { var items = []; var path = "/" + options.storageAccount; path += "/" + decodeURIComponent(options.resourcePath); items.push(path); // TODO: handle storage rest api query parameters. // need to add them to options and items // as described here - http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx#Constructing_Element var result = items.join('\n'); return result; } }
Notes
I am next looking into building something to help people with weekly shopping things. During my visit to a mega market for grocery shopping, I was just watching people doing shopping. Here is what I observed:
While one visit is hard to conclude behaviors, but few things stand out for this visit:
More after next visit.
3/3/2013 2:25 AM
Missing many good hymns Jeremy
Such as Victory in Jesus, The Solid Rock, The Lily of the Valley, I Have Decided to Follow Jesus, Were You There, Sweet Hour of Prayer, etc. Also A Mighty Fortress uses an unpopular translation. There are also duplicates of Christ the Lord is Risen Today. On the other hand, the ability to print scores is very nice.
Jeremy – thanks for taking time to write feedback. We do take feedback seriously. Regards the missing hymns – we are only able to bring the hymns which are in public domain; they are analyzed, formatted & published by our hymn expert. Also note that he is a volunteer. So – after new hymn request it may take some time.
Victory in Jesus – there are multiple hymns titled “Victory in Jesus”, but the most popular one (and I’m guessing the requested one) was written in 1939 and is still under copyright protection.
The Solid Rock – is already present. The actual title of the hymn is “My Hope is Built”.
Christ the Lord is Risen Today (Lyra) – you’re correct that there have same lyrics. But they have different tunes used for the same lyrics. There are actually multiple hymns in the same situation, including “Blest Be the Tie that Binds”, “Dear Christians One and All Rejoice”, “Happy the Man Who Feareth God”, and numerous others. Most of them are old hymns whose usage grew up in different places with different tunes. We will see if we can add the tune name in the title to bring more clarity.
A Mighty Fortress – This is a difficult question. There are many translations and composites out there. Translations continue to be tweaked and reworked in modern days, and the translation that is mostly used in the USA today might be that in the ecumenical “Lutheran Book of Worship”, which is copyright 1978. It is such a “core” hymn that everyone likes their own. The more common one is the revision of that tune by Bach. In this case, we will see if we can add second translation using the Bach version of the tune.
Amortization schedule calculator is a must have calculator to calculate EMI and manage payments for your home mortgage, auto loan or any other kind of loans. Whether you are computing amortization schedules to decide on a loan, managing existing loans payments or considering to do extra principal payments to get debt free early – this application will help you.
Given the loan amount, term, interest rate, additional principal payments (if any) and the start date, it gives you the monthly payment schedule for the term of the loan. Each monthly payment has the interest and principal component breakup. It lets you share the schedule by mail or save to a csv file.
Last 5 computations are saved for your reference. They will be available for future reference on all your windows 8 devices.
It will help you get visibility into your loan interest and principal payments month by month. It can help you see how extra principal payments impact future payments, and reduce the term of the loan. You can track multiple loan schedules by referring your last computations.
Welcome to the world of hymns. Imagine yourself browsing through your favorite hymns – reading the lyrics, watching the score and playing their music. You can also print it for your reference. If you love hymns, Hymn world is for you!
Hymn world lets you explore the world of hymns. It lets you refer the lyrics and scores; play music of hundreds of hymns in public domain. You can search using part of the title of the hymn.
Stay tuned for more!