Geeks With Blogs

News profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Donate Bitcoins

My Gooroo profile


Programming and Learning from SD JavaScript
Using Json.Net JObject with WebApi
I needed to pass some data from JavaScript to my WebAi Controller and came across Rick Strahl's passing multiple POST parameters to Web API article, his use of the JObject from Json.Net and dynamics works really well. Note usage of the jsondata[“UserId”].Value<... This is a simplified example of the code I‘m using.Note: you can also return the JObject. System.Web.Mvc.HttpPost] public HttpResponseMessage UpdateUserInfo(JObject jsonData) { // http://www.asp.net/web-api/... ......

Posted On Thursday, January 17, 2013 3:21 PM

Setting a var property in the JavaScript Revealing Module Pattern requires a setter and a getter
See John Papa's article for more information on the revealing pattern.See http://www.addyosmani.com/r... for a great reference as well. I was trying to expose a property in my JavaScript object and setting it from an outside caller. When I ran the code, the value didn’t change. This held me up for awhile yesterday. When I Googled, GoodSearched the problem today, I found a question on Stackoverflow that was similar and lead me in ......

Posted On Tuesday, January 15, 2013 8:31 AM

Aurelia Links
I'm posting new links at my new AlignedDev blogI’ve been following AureliaJs for quite awhile now and I’ve collected a lot of links. Here they are, in no particular order, for you to enjoy. Please follow me @alignedDev and checkout my articles on Gooroo. My Aurelia Code for a presentation https://channel9.msdn.com/E... http://pca.st/Jodj - The Aurelia JavaScript Framework with Rob Eisenberg - Hanselminutes http://www.youtube.com/watc... ......

Posted On Monday, November 14, 2016 10:25 AM

$.ajax and WebApi example
I showed $.ajax at lunch yesterday and I've put up my code on github. There’s a simple javaScript class example and a Knockout example for comparison. I also avoided using jQuery (except for the $.ajax). I also added a knockout example to you can compare a simple example. Getting WebApi setup threw me for a loop. Use GlobalConfiguration.Configu... Also I needed some help to post a primitive value to a WebApi method. EDIT: August 25, 2015: I updated my AjaxExample using a data ......

Posted On Wednesday, August 19, 2015 6:12 PM

Application Insights is not showing browser exceptions when window.onerror is set
We are using Application Insights from Azure to gain insight into our production database. We noticed that the browser tab was not showing Browser exceptions. This should be working by default as discussed in their Application Insights for web pages walk through shows, but ours was empty. I was certain we didn’t have perfect JavaScript code, so I dug deeper. First I made a quick file new project in Visual Studio, checked use Application Insights, added a throw new Error(‘bad dev!`), published it ......

Posted On Thursday, November 10, 2016 3:52 PM

Karma Test Results with TFS Build
TLDR; 1. Setup the Karma Trx Reporter. 2. Add Publish Results Build Step using ../TestResults/**/karma-tes... as the path. 3. If remote Vm for Jasmine tests, copy the .trx file to the Results directory. Our team has been using JasmineJs for unit testing our client side JavaScript code. We now have over 3,000 tests! In order to run these tests on multiple browsers we useKarma, the "Spectacular Test Runner for JavaScript" created by people from Google to run all our tests on multiple browsers. ......

Posted On Friday, September 16, 2016 7:54 AM

Teaching JavaScript
I had the privilege of spending time with four interns at Omnitech this summer. See our @Omnitech Twitter feed to learn a little more about them. Sometimes it's difficult to know how to have interns at a company, but we see it as an investment in them, the community and ourselves. We've had several interns in the past become valuable employees. It's fun to see how much they grow personally and technically in just a few months or years. I didn't have the opportunity to work with them directly, but ......

Posted On Wednesday, August 24, 2016 2:35 PM

When does $.when.apply resolve the promises?
I learned some new things about $.when.apply that were worth sharing. http://jsfiddle.net/logankd... · the first reject will fire the .always, but not the .then · .then won’t fire until all promises are resolved (or one is rejected) Maybe not new to you, but I had to try it out after seeing the last answer at http://stackoverflow.com/qu... I was playing with this again and made a different, simplified playground on codepen. 11/13/15EDIT 2: ......

Posted On Friday, January 30, 2015 7:53 PM

MutationObserver in HTML5
We were just in a code review and one of the guys showed how he was using the MutationObserverer with our search control to get tiles to resize after the list (Knockout observable). I hadn’t heard of this before and it looks very useful. Read the linked html5rocks.com page (from 2012) to learn more about it. It’s supported on all but Opera mini and started in IE 11 and is a more performant than the old Mutation Events that have been deprecated. You point the MutationObserver to the DOM node and it ......

Posted On Thursday, January 29, 2015 7:55 PM

ctrl+p in Chrome Developer Tools to find and open a file
I was watching part of Using TypeScript for Large Angular JS Applications on TypeScript. In the SourceMaps and TypeScript section, Justin Schwarty mentions that ctrl+p in the Chrome Dev Tools will pull up a list of files (css, js) that you can debug against. This is similar to the ctrl + comma in Visual Studio (or ctrl + t with Resharper). Hopefully, you’re already aware of this, but for me it will be a huge time server. I’ve searched through the tree of files far too often. The official shortcuts ......

Posted On Tuesday, January 13, 2015 4:03 PM

Copyright © Aligned | Powered by: GeeksWithBlogs.net | Join free