tag:blogger.com,1999:blog-57575983279908641002024-03-13T17:14:19.678-04:00Dan vs MachineSoftware development insights from developer Dan ShultzDan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.comBlogger66125tag:blogger.com,1999:blog-5757598327990864100.post-23485732980235995212018-11-13T21:45:00.000-05:002018-11-13T21:45:08.044-05:00Walkthrough: Serving gzipped JavaScript files from Amazon S3<div dir="ltr" style="text-align: left;" trbidi="on">
Here's my walkthrough on serving gzipped JavaScript files from Amazon S3 from the PolyglotDeveloper blog:<br />
<iframe width="600px" height="500px" src="https://www.thepolyglotdeveloper.com/2018/10/serving-gzipped-javascript-files-amazon-s3//" ></iframe>
<br /></div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-44453961525642082662018-10-10T15:21:00.001-04:002018-10-10T16:00:06.109-04:00Walkthrough: Creating a basic Chrome Extension<div dir="ltr" style="text-align: left;" trbidi="on">
Here's my walkthrough on creating a Chrome Extension from the PolyglotDeveloper blog:<br />
<iframe width="600px" height="500px" src="https://www.thepolyglotdeveloper.com/2018/09/creating-basic-chrome-extension/" ></iframe>
<br /></div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-81242979716554464442017-10-19T12:34:00.000-04:002017-10-19T12:34:06.644-04:00Copy Code button with feedback when code has been successfully copied.<div dir="ltr" style="text-align: left;" trbidi="on">
Here is a Pen of a combination textarea/button that gives the user feedback when code has been copied. (Uses the d3.js library for the animation) The animation is unique each time.<br /><br />
<p data-height="265" data-theme-id="0" data-slug-hash="MmNQPw" data-default-tab="js,result" data-user="danshultz11" data-embed-version="2" data-pen-title="Copy Code feedback button" class="codepen" style="margin-top:20px;"><a href="https://codepen.io/danshultz11/pen/MmNQPw">Copy Code feedback button</a>
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
<br /></div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-18942657553481545782017-06-30T14:56:00.001-04:002017-06-30T14:56:34.028-04:00The world's simplest AngularJS tab control<div dir="ltr" style="text-align: left;" trbidi="on">
Here is a very simple tab control - created using AngularJS - with literally just one line of javascript code - a scope variable bound to the page.
<p>I had originally scoured the web for a bootstrap or other tab control available, but after playing around with some HTML & Angular, I came up with this simple, functional control: 1 line of JS, 2 css selectors and 4 divs.</p>
<p data-height="265" data-theme-id="dark" data-slug-hash="jwZjaP" data-default-tab="js,result" data-user="danshultz11" data-embed-version="2" data-pen-title="World's simplest AngularJS tab control" class="codepen">See the Pen <a href="https://codepen.io/danshultz11/pen/jwZjaP/">World's simplest AngularJS tab control</a> by Dan Shultz (<a href="https://codepen.io/danshultz11">@danshultz11</a>) on <a href="https://codepen.io">CodePen</a>.</p>
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
<br /></div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-70276891304224017692015-10-31T21:45:00.000-04:002016-01-28T14:42:08.439-05:00Visual Studio TACO - Cordova WebView containing jQuery<div dir="ltr" style="text-align: left;" trbidi="on">
<p>
If you're using Visual Studio Tools for Apache Cordova (TACO), you may notice a problem if you want to display an external webpage using the Cordova WebView, if the external page uses jQuery. Once you build and start debugging your app, as soon as you try to display the external page, an exception will be thrown in the jquery.js file used by the external page.
</p><p>
Before we look at what the problem is, here's a quick review of displaying external web pages in a Cordova app:
<ul>
<li><p>Whitelist the page/domain in config.xml in the Domain Access section under the Common tab</p></li>
<li><p>In JavaScript, call window.open(whitelistedUrl)</p></li>
</ul>
</p>
<p>
The good news about this problem, is it's not really a problem - except when you're debugging. After failing every time I tried testing opening the new window, I swapped in the non-minified jquery file (in the external page) to take a look at where we were failing. It ends up in the jquery file itself, it does a try-catch that should throw an error for all non-gecko browsers, then swallows the error:
</p>
<pre>
try {
matches.call( div, "[test!='']:sizzle" );
rbuggyMatches.push( "!=", pseudos );
} catch ( e ) {}
</pre>
<p>
...But it ends up that even though this error is swallowed, The Visual Studio TACO debugger stops the processing at the point where the error is thrown, and even if you continue processing, it usually won't display the page. Even though this code is executed on any page on the www containing jquery, when those pages are pulled into a Cordova WebView using Visual Studio TACO debugging, processing stops and the app appears to error out for no reason.
</p>
<p>
But if you run your app in Release Mode, you'll see that the page gets pulled into the Cordova WebView just fine, now that the debugger doesn't halt on the swallowed error. So the answer is that you can't debug past the point where you pull an external page into a Cordova WebView. You'll need to test that part in release mode, and if there are any problems, you can debug the page using Chrome Dev Tools on the site itself.
</p>
<p>
If this is unacceptable, another alternative would be to look into using the Cordova InAppBrowser plugin, which has no problem with external jQuery files, but the downside is that it does pop up a new browser window.
</p>
<br /></div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-64445997029555943802015-10-22T21:24:00.000-04:002016-01-28T14:42:24.714-05:00 First Take on Visual Studio Tools for Apache Cordova (TACO)<div dir="ltr" style="text-align: left;" trbidi="on">
<p>
I installed the Visual Studio Tools for Apache Cordova last week to see how feasible it would be to use with an existing PhoneGap Android codebase.
</p><p>
I still haven't gotten to the point of publishing to Google Play yet (next post), but I thought I'd share a few of the pain points/errors I've encountered during setup and steps to resolve them:
</p>
<p><em>(Note that these are specific to Android)</em></p>
<p><strong><br />
1) "Could not create the Java Virtual Machine" error</strong>
</p><p>This is a memory issue with the JVM. The recommendation is to set your _JAVA_OPTIONS TO -Xmx512M <br />
<a href="http://taco.visualstudio.com/en-us/docs/tips-and-workarounds-android-readme/#could-not-create-java-virtual-machine-error">Full instructions</a>
<br />
</p>
<p><strong><br />
2) Error DEP10201 (No device found)</strong>
</p><p>The Android emulator is a slow klunky experience. When you graduate to using your personal device to debug, you'll need to set up USB debugging. First, make sure USB debugging is enabled on your phone. On some Android phones, you first have to go to Apps..Settings..About Phone, then tap 7 times on the Build Number to enable Developer Options.<br />
<a href="http://www.verizonwireless.com/support/knowledge-base-117727/"> Full instructions on how to enable USB debugging on an Android phone</a> <br /><br />
After enabling USB debugging on your device you will then need to
<a href="http://developer.android.com/tools/extras/oem-usb.html">install a USB driver for debugging</a>.<br />
<br />
</p>
<p>
So now that we're set up to test and debug on our phone, we'll look at some of the TACO nuances and the deployment process next week - hopefully with an app successfully deployed to Google Play.
</p>
<br /></div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-43564505720725801972014-07-08T14:15:00.000-04:002016-01-28T14:45:51.770-05:00JavaScript Variable HoistingOne of the little known nuances of JavaScript, is that the interpreter organizes functions and variables per scope by declaring them at the beginning of the scoping container, regardless of their order in the written script. Here's an example:<br />
<textarea rows="9" cols="40" style="margin-top:7px">
function showVariableValues() {
console.log("x=" + x);//x is undefined
var x = 1;
console.log("x=" + x);//x is 1
console.log("y=" + y);//error
}
showVariableValues();
</textarea><br />
Displays:<br />
<div class="callout">
<div style="font-weight:bold">x=undefined
<br />
x=1
<br />
<span style="color:#a00;">Uncaught ReferenceError: y is not defined </span>
</div>
</div>
In the above example, we're logging the value of variables x and y before they are declared, however, x has a value of <pre style="display:inline">undefined</pre> whereas y throws an error. So what's the difference? Neither variable has been declared when we are accessing them. Why do we only get an error when referencing y?
<br /> <br />
The reason is that the JavaScript interpreter reorganizes the declaration of ALL varibles within a scope to the top of the scope - in our case our scope is the function <pre style="display:inline">showVariableValues()</pre>. So in reality, our above code will be reorganized as shown below:
<br />
<textarea rows="10" cols="50" style="margin-top:7px">
function showVariableValues() {
var x;//declaration was hoisted by JS
console.log("x=" + x);//x is undefined
x = 1;//initialization stays in same spot
console.log("x=" + x);//x is 1
console.log("y=" + y);//error
}
showVariableValues();
</textarea>
<br />
Notice that the declaration of var x has been "hoisted" to the top of the scope, but only the declaration. The initialization of the variable remains in its original spot. Once this variable was declared, JavaScript set its value to <pre style="display:inline">undefined</pre> - the JavaScript default. So that's why when we write the value of x, it's value is <pre style="display:inline">undefined</pre>, whereas y just throws an error because it has not been declared.
<br /> <br />
So the lesson is: always declare your variables at the beginning of their scope - if you don't, JavaScript will reorganize your code for you. If you think about it, you could probably come up with scenarios with much more confusing results than this simple example.Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-25014678135296119352014-02-26T12:49:00.000-05:002014-02-26T12:49:13.469-05:00This Fine Morning
<img border="0" src="http://3.bp.blogspot.com/-1rEnoC5H5Zk/Uw4LjgVUDZI/AAAAAAAAB3Y/MEI4Tp112e8/s1600/01a.png" />
<br />I like V8 juice. Every morning, on the way into work, I drink a glass of V8 juice.<br /><br />
<img border="0" src="http://3.bp.blogspot.com/-XDh6Gkq8fBo/Uw1hTyBa2WI/AAAAAAAAB20/4Qrn57kSFh4/s1600/02sm.png" />
<br />Today was a bit strange - we had some flurries overnight, and I had left my car outside, so it had a coating of snow, so I took a few minutes and brushed the snow off the windows before leaving.<br /><br />
<img border="0" src="http://3.bp.blogspot.com/-iYQoidXsPHQ/Uw1F7qLGLmI/AAAAAAAAB14/N9n4ZV4VhdM/s1600/03sm.png" />
<br />Since I was running late, I had to take our daily Skype call via cell. Usually I do it from my laptop at my desk, but in a pinch like this, I had to take it on my Android in the car.<br /><br />
<img border="0" src="http://4.bp.blogspot.com/-OGEtpgG6LfI/Uw1F8byWZnI/AAAAAAAAB2E/PqCGYPc1uVE/s1600/04sm.png" />
<br />But during the call, I noticed out of the corner of my eye that someone was gesturing to me from the car beside me...<br /><br />
<img border="0" src="http://3.bp.blogspot.com/-qRnMgV3rWX8/Uw1F8pMyT6I/AAAAAAAAB2I/S8vHoDAyLT8/s1600/05sm.png" />
<br />After watching her for a few seconds, she then started gesturing like she was taking a drink, and pointing to my roof... and it hit me... I'd left my V8 on the roof of my car! Then, double-yikes, we were out of plastic cups, and I'd used a GLASS today! - Holy crap, there was a glass balancing on my roof driving 70 MPH on the interstate! <br /><br />
<img border="0" src="http://3.bp.blogspot.com/-iTRJdQvA7uI/Uw4L1917xoI/AAAAAAAAB3g/-aRwfWRRmw4/s1600/08sm.png" />
<br />So the first thing I did was try to get as far ahead / away from everyone else as I could, and look for the first place I could <nobr>C-A-R-E-F-U-L-L-Y</nobr> pull over.<br /><br />
<img border="0" src="http://1.bp.blogspot.com/-tdCliLHkbWM/Uw4L4UQh4oI/AAAAAAAAB3o/tXM4MQJIztY/s1600/06sm.png" />
<br />When I finally was able to pull over and come to a stop, I got out among some curious looks, and sure enough my glass of V8 was still precariously perched on my roof. Between the snow on my roof, the wetness of the glass, and the cold temperature, the glass had become soldered to my roof with ice. In fact, it was attached so firmly that I had to pry it off. I probably could have done donuts and would have only spilled the juice. Happy ending.<br /><br />
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-52384656453011964282014-01-21T13:19:00.000-05:002014-01-21T13:21:27.043-05:00Using custom binding to manage large datasets with the Kendo Grid<p>The KendoUI grid comes with robust client-side functionality, and Ajax-capabilities - sorting, filtering, paging is all just built in. With the Razor wrapper, the .Pageable(), .Sortable(), and .Filterable() extension methods take care of it all. If the data you’re displaying is minimal or even a few thousand rows, this is probably the route to go – just set the grid's dataSource to Ajax, create a read action on your controller, and you’ve got a pretty robust grid.</p>
<p>
But once you get into dealing with “large” datasets, you may want to consider implementing custom binding to get data in front of the user without the wait. When I say “large”, I mean data that takes more than a few seconds to display, or data that is likely grow quickly to an unmanageable size. In our scenario the size of the dataset could be up to 25 Mb, but even after compressing it to 800k, it was taking several seconds to send the data from the server to the browser and then display the data in the grid. After the painful initial wait though, paging, sorting, filtering was then instantaneous since the data was all client side. But what to do about the initial wait?</p>
<p>
That’s where custom binding can help out. By implementing custom binding, you can combine the best of Ajax and Server binding to quickly deliver large datasets to your users. A small drawback is that all the sorting, filtering, paging has to be handled in the controller method. Fortunately Kendo makes this fairly easy by automatically passing collections of criteria on the request object – here’s a quick overview of server code required to manually implement paging, sorting and filtering when implementing custom binding.
</p>
<div style="font-weight:bold;color:#aadd99;">Sorting</div>
The sorts collection on the request object contains the fields and directions of all sorts that are currently applied to the grid.
<textarea rows=25" cols="70" style="max-height:200px;max-width:600px;" wrap="off">
foreach (SortDescriptor sortDescriptor in request.sorts)
{
if (sortDescriptor.SortDirection == ListSortDirection.Ascending)
{
switch (sortDescriptor.Member)
{
case "Name":
summaries = summaries.OrderBy(s => s.Name);
break;
case "Type":
summaries = summaries.OrderBy(order => order.Type);
break;
//Ad Nauseum...
}
}
else
{
switch (sortDescriptor.Member)
{
case "Name":
summaries = summaries.OrderByDescending(s => s.Name);
break;
case "Type":
summaries = summaries.OrderByDescending(order => order.Type);
break;
//Ad Nauseum – all sortable columns
}
}
}
</textarea><br /><br />
<div style="font-weight:bold;color:#aadd99;">Filtering</div>
This is beautiful – I was expecting to have to write code to handle all possible operators and fields, but Kendo’s ExpressionBuilder class will take the filters collection from the request and convert it to a lambda expression to be applied to your dataset! Way easy.
<textarea rows=3" cols="70" style="max-height:200px;max-width:600px;" wrap="off">
var exp = ExpressionBuilder.Expression<CampaignModel>(request.Filters);
mappedSummaries = mappedSummaries.AsQueryable().Where(exp);
</textarea><br /><br />
<div style="font-weight:bold;color:#aadd99;">Paging</div>
Based on the page number and the page size, determine the subset of data to return to the client.
<textarea rows=10" cols="70" style="max-height:200px;max-width:600px;" wrap="off">
if (request.Page > 0)
mappedSummaries = mappedSummaries.Skip((request.Page - 1) * request.PageSize);
}
mappedSummaries = mappedSummaries.Take(request.PageSize);
var result = new DataSourceResult()
{
Data = mappedSummaries,
Total = total
};
</textarea><br /><br />
<p>
One other thing to remember when implementing custom binding is that Server caching of the dataset is something to keep in mind – especially if the db call takes more than a second or two. With custom binding, we’re calling back to the server on every filter, page, or sort event – so we don’t want to make a db call on top of that every time. This is true even (and especially) if we use Kendo’s Server databinding instead of Ajax databinding.
So anyway, if you’re using Kendo’s data grids, the out of the box Ajax binding is a good, easily implementable solution, but if you’re dealing with large amounts of data, you’ll want to look into custom binding.
</p>
<p>
Full Razor code for grid with custom binding enabled:<br />
</p>
<textarea rows=25" cols="70" style="max-height:200px;max-width:600px;" wrap="off">
@(Html.Kendo().Grid<CampaignAdminListModel>()
.Name("Grid")
.BindTo(Model)
.EnableCustomBinding(true)
.DataSource(ds => ds
.Ajax()
.PageSize(12)
.Read(read => read.Action("Index", "CampaignAdmin")))
.Columns(columns =>
{
columns.Bound(p => p.CampaignName);
columns.Bound(p => p.LeadSourceType).Width(150);
columns.Bound(p => p.LeadSourceTypeName).Width(200);
columns.Bound(p => p.Source).Width(200);
columns.Bound(p => p.Channel).Width(150);
columns.Bound(p => p.SubChannel).Width(150);
columns.Bound(p => p.Exclude).Width(70);
columns.Bound(p => p.Status).Width(70);
columns.Bound(p => p.ProductCategory).Width(150);
columns.Bound(p => p.QueryStringParameters).Width(150);
columns.Bound(p => p.CampaignId).Width(100);
columns.Bound(p => p.LeadSourceId).Width(100);
})
.Pageable()
.Sortable()
.Filterable()
.ColumnMenu()
.Scrollable(scrolling => scrolling.Height(500))
)
</textarea><br /><br />
Full controller method for grid Read event:<br />
<textarea rows=25" cols="70" style="max-height:200px;max-width:600px;" wrap="off">
[HttpPost]
//Required by KendoGrid.DataSource.Read event
public ActionResult Index([DataSourceRequest] DataSourceRequest request)
{
var mappedSummaries = GetMappedCampaignAdminList(_userProfile.AccountId);
//Apply Sorting
mappedSummaries = SortMappedSummaries(mappedSummaries, request.Sorts);
//Apply Filters
var expression = ExpressionBuilder.Expression<CampaignAdminListModel>(request.Filters);
mappedSummaries = mappedSummaries.AsQueryable().Where(expression);
var total = mappedSummaries.Count();
//Apply paging
if (request.Page > 0)
{
mappedSummaries = mappedSummaries.Skip((request.Page - 1) * request.PageSize);
}
mappedSummaries = mappedSummaries.Take(request.PageSize);
var result = new DataSourceResult()
{
Data = mappedSummaries,
Total = total
};
var jsonResult = Json(result, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
</textarea>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com2tag:blogger.com,1999:blog-5757598327990864100.post-88907297344849450872013-08-02T05:00:00.000-04:002013-08-02T05:00:04.335-04:00Manipulating Kendo's RangeSlider via JavaScript<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
After dealing with Kendo's Range Slider control this afternoon, I thought it would be worthwhile to post some sample code for dealing with this control on the client side. Manipulating the RangeSlider on the client side is very simple and straightforward, but there isn't good documentation of this control, which has many properties and methods, so you could wind up spending a lot of time grasping at straws.
<br /><br />
Kendo's RangeSlider control:<br />
<a href="http://3.bp.blogspot.com/-ZpJUKxW21N0/UfrQPczoPrI/AAAAAAAABxY/0R0HBlYtvv0/s1600/rangeSlider.png" imageanchor="1" style="clear: both; float: none; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-ZpJUKxW21N0/UfrQPczoPrI/AAAAAAAABxY/0R0HBlYtvv0/s320/rangeSlider.png" /></a></div>
<br />
We're creating this control in an ASP.Net MVC project using Razor syntax:
<pre>@(Html.Kendo().RangeSlider()
.Name("RangeSlider")
.Max((double)Model.RevenueUpperBound)
.Min((double)Model.RevenueLowerBound)
.Values(Model.MinVal, Model.MaxVal)
.Events(events => events.Change(x => "updateVals")))
</pre>
<br />
But after the page is rendered, we want to programmatically change the start and end points via JavaScript. Looking at the object in FireBug, you can see several promising properties and methods like selectionStart, selectionEnd, bind(), etc... But ultimately, you'll just want to new up a JavaScript array containing the two integer values you want to use as the start and end values.
<br />
<br />
The example below resets our RangeSlider to a start value of 10 and an end value of 111. (Make sure your start and end values are between the upper and lower boundaries of the control itself).
<pre>
function resetSlider(){
<span style="color:LightGreen">//Get a handle on our element's RangeSlider</span>
var slider = $('#RangeSlider').data('kendoRangeSlider')
<span style="color:LightGreen">//Feed it an array of two numbers.</span>
slider.value(new Array(10, 111))
}
</pre>
That's it... As easy as 3.14.
</div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com1tag:blogger.com,1999:blog-5757598327990864100.post-83147655643484328622013-04-17T13:38:00.000-04:002013-04-18T11:32:15.142-04:00Multitudes / Animal Collective names<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
Correct multitude naming per animal, in case you were wondering. Back to software-related info next post :)</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A Crash of Rhinoceroses. </div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
A School of Fish. <o:p></o:p></div>
<div class="MsoNormal">
A Litter of Pups. <o:p></o:p></div>
<div class="MsoNormal">
A Flock of Sheep. <o:p></o:p></div>
<div class="MsoNormal">
A String of Ponies. <o:p></o:p></div>
<div class="MsoNormal">
A Harras of Horses. <o:p></o:p></div>
<div class="MsoNormal">
A Pride of Lions. <o:p></o:p></div>
<div class="MsoNormal">
A Herd of Elephants. <o:p></o:p></div>
<div class="MsoNormal">
A Plague of Locusts. <o:p></o:p></div>
<div class="MsoNormal">
A Colony of Ants. <o:p></o:p></div>
<div class="MsoNormal">
A Covey of Quail.<o:p></o:p></div>
<div class="MsoNormal">
A Kindle of Kittens. <o:p></o:p></div>
<div class="MsoNormal">
A Leap of Leopards.<o:p></o:p></div>
<div class="MsoNormal">
A Pod of Seals. <o:p></o:p></div>
<div class="MsoNormal">
A Sloth of Bears. <o:p></o:p></div>
<div class="MsoNormal">
A Rafter of Turkeys. <o:p></o:p></div>
<div class="MsoNormal">
A Pace of Asses. <o:p></o:p></div>
<div class="MsoNormal">
A Walk of Snipe. <o:p></o:p></div>
<div class="MsoNormal">
A Gam of Whales. <o:p></o:p></div>
<div class="MsoNormal">
A Nest of Rabbits. <o:p></o:p></div>
<div class="MsoNormal">
A Gang of Elk. <o:p></o:p></div>
<div class="MsoNormal">
A Quiver of Cobra. <o:p></o:p></div>
<div class="MsoNormal">
A Dule of Doves. <o:p></o:p></div>
<div class="MsoNormal">
A Skulk of Foxes. <o:p></o:p></div>
<div class="MsoNormal">
A Dissimulation of Birds. <o:p></o:p></div>
<div class="MsoNormal">
A Prickle of Porcupines. <o:p></o:p></div>
<div class="MsoNormal">
A Peep of Chickens. <o:p></o:p></div>
<div class="MsoNormal">
A Band of Gorillas. <o:p></o:p></div>
<div class="MsoNormal">
A Business of Ferrets. <o:p></o:p></div>
<div class="MsoNormal">
A Bale of Turtles. <o:p></o:p></div>
<div class="MsoNormal">
A Pitying of Turtledoves. <o:p></o:p></div>
<div class="MsoNormal">
A Drift of Hogs. <o:p></o:p></div>
<div class="MsoNormal">
A Paddling of Ducks. <o:p></o:p></div>
<div class="MsoNormal">
A Siege of Herons. <o:p></o:p></div>
<div class="MsoNormal">
A Trip of Goats. <o:p></o:p></div>
<div class="MsoNormal">
A Charm of Finches. <o:p></o:p></div>
<div class="MsoNormal">
A Cete of Badgers. <o:p></o:p></div>
<div class="MsoNormal">
A Squadron of Pelicans. <o:p></o:p></div>
<div class="MsoNormal">
A Shoal of Bass. <o:p></o:p></div>
<div class="MsoNormal">
An Exaltation of Larks. <o:p></o:p></div>
<div class="MsoNormal">
A Drove of Cattle. <o:p></o:p></div>
<div class="MsoNormal">
A Singular of Boars. <o:p></o:p></div>
<div class="MsoNormal">
A Tidings of Magpies. <o:p></o:p></div>
<div class="MsoNormal">
A Gaggle of Geese. <o:p></o:p></div>
<div class="MsoNormal">
A Flutter of Butterflies. <o:p></o:p></div>
<div class="MsoNormal">
A Husk of Hares. <o:p></o:p></div>
<div class="MsoNormal">
An Unkindness of Ravens. <o:p></o:p></div>
<div class="MsoNormal">
A Labor of Moles. <o:p></o:p></div>
<div class="MsoNormal">
A Richness of Martens. <o:p></o:p></div>
<div class="MsoNormal">
A Cast of Hawks. <o:p></o:p></div>
<div class="MsoNormal">
A Knot of Toads. <o:p></o:p></div>
<div class="MsoNormal">
A Descent of Woodpeckers. <o:p></o:p></div>
<div class="MsoNormal">
A Sounder of Swine. <o:p></o:p></div>
<div class="MsoNormal">
A Mustering of Storks. <o:p></o:p></div>
<div class="MsoNormal">
A Clutch of Eggs. <o:p></o:p></div>
<div class="MsoNormal">
A Bouquet of Pheasants.<o:p></o:p></div>
<div class="MsoNormal">
An Army of Caterpillars. <o:p></o:p></div>
<div class="MsoNormal">
A Hover of Trout. <o:p></o:p></div>
<div class="MsoNormal">
A Flight of Swallows. <o:p></o:p></div>
<div class="MsoNormal">
A Troop of Kangaroos. <o:p></o:p></div>
<div class="MsoNormal">
A Clowder of Cats. <o:p></o:p></div>
<div class="MsoNormal">
A Watch of Nightingales. <o:p></o:p></div>
<div class="MsoNormal">
A Barren of Mules. <o:p></o:p></div>
<div class="MsoNormal">
A Shrewdness of Apes. <o:p></o:p></div>
<div class="MsoNormal">
A Rag of Colts. <o:p></o:p></div>
<div class="MsoNormal">
A Bloat of Hippos. <o:p></o:p></div>
<div class="MsoNormal">
A Smack of Jellyfish. <o:p></o:p></div>
<div class="MsoNormal">
A Mischief of Mice. <o:p></o:p></div>
<div class="MsoNormal">
A Congregation of Alligators. <o:p></o:p></div>
<div class="MsoNormal">
A Parliament of Owls. <o:p></o:p></div>
<div class="MsoNormal">
A Route of Wolves. <o:p></o:p></div>
<div class="MsoNormal">
A Host of Sparrows. <o:p></o:p></div>
<div class="MsoNormal">
An Ostentation of Peacocks.<o:p></o:p><br />
A Murder of Crows.</div>
</div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com2tag:blogger.com,1999:blog-5757598327990864100.post-71459527546130870012012-11-20T18:07:00.000-05:002012-11-20T19:28:00.821-05:00Hats off to CodeProject, Intel<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://www.codeproject.com/script/Awards/competition.aspx?cid=598" target="_blank">CodeProject is currently holding a Windows 8 & Ultrabook App Innovation contest</a> and I was fortunate enough to make it to the second round. It's a great contest, as all first round winners, myself included, were winners of a brand spanking new prototype model Ultrabook for development:<br />
<div class="callout">
4Gb memory, Intel I-7(Ivy Bridge) Processor 2-2.5GHz,<br />
160Gb HD, 5 Touchpoint Screen, Windows 8 OS.</div>
<div>
<a href="http://4.bp.blogspot.com/-wDi9dHmZu-A/UKvNT3XaX1I/AAAAAAAABmE/9-kGSVRTFqI/s1600/ultrabook.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-wDi9dHmZu-A/UKvNT3XaX1I/AAAAAAAABmE/9-kGSVRTFqI/s320/ultrabook.png" width="320" /></a><br />
<br /></div>
<div>
I don't really have any technical points in this post, but I wanted to give some kudos to the folks at CodeProject as well as Intel, since I did have an issue with my screen cracking after a week or two. Since it was a free laptop, and CodeProject barely knows who I am, I was not hopeful about being able to get this issue resolved. And it's an unbranded prototype, so I wasn't really sure what manufacturer would be able to help me. Plus, it's a touch screen, so you can't just replace the glass like other laptops (even though it was still fully functional using mouse and keyboard).<br />
<br />
But Chris at CodeProject pointed me to Premier Intel support, which came with the laptop, and they swapped it out for me as soon as I could give them a UPS tracking number. Five days later, I'm up and running on the replacement, and it's the best laptop I've ever owned. Fast, responsive, and boots to a functional Windows 8 login screen within 5 seconds. Thanks, CodeProject!</div>
</div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-67017248605961370762012-11-13T17:55:00.000-05:002012-11-14T11:19:45.863-05:00Windows 8 Store Deployment - Lessons Learned<div dir="ltr" style="text-align: left;" trbidi="on">
After finally <a href="http://apps.microsoft.com/webpdp/en-us/app/space-station-finder/1108642a-92db-4e53-9eb3-49892f862957" target="_blank">getting an app deployed to the Windows 8 Store,</a> I wanted to share some learning experiences. I went through 2 multiple-hour sessions with the MS engineers - the first session focused more on coding and performance and uncovered the fact that the app was consuming a great deal of memory. It ended up that a few simple jQuery animations - which functioned OK in all other browsers including IE9 - went through the roof on memory consumption in IE10. So I minimized the jQuery animations and it resolved that issue, and now I am looking into revisiting it with the current version of IE10 and the RTM version of Windows 8.<br />
<br />
The second interview dealt more with Win8/Metro standards and things like using Settings and the positioning of elements on the screen. At that point I was ready to deploy to the web store, which is a time-consuming process. I did find that having concise notes pertinent to each deployment did help speed up the turnaround time - the first submission took about 5 days to be rejected. By the time it was finally approved, I had deployed 3 times in one day, entering very specific details of the changes I was submitting.<br />
<br />
A few things that bit me especially hard:<br />
<a href="http://www.blogger.com/%3Ca%20href=%22http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx%22%3E" target="_blank">Certification Requirement #4.1</a> - Privacy Statement. If you use ANY user information, which includes accessing geolocation, you have to mention this in the privacy statement.<br />
<br />
Also, if you have a privacy statement you must include it in your settings, AS WELL AS a link to a privacy statement HTML page in your store description.<br />
<br />
<a href="http://www.blogger.com/%3Ca%20href=%22http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx%22%3E" target="_blank">Certification Requirement #6.2</a> - Age Rating. You have a clean app, right? Clean content, and you just implement the Sharing source contract so people can share text or an image from your app to Twitter, Facebook or whatever social network. Well, you'll have to make sure your age rating is 12+ for "uncontrolled sharing", or else you'll surely be rejected.<br />
<br />
If you want to "control" sharing, you'll have to create some custom code to enable the user to "allow" other users to share from your application. So, assuming you're not targeting the 3 to 11-year-old crowd, you'll want to set your app's age rating to 12+ any time you implement the Sharing Source contract.</div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-30750441883804987592012-09-24T12:22:00.000-04:002012-10-10T08:40:15.430-04:00Responsive Design and Portability into Windows 8<div dir="ltr" style="text-align: left;" trbidi="on">
One of the most common gotchas when you're trying to deploy your Windows 8 Metro* HTML app to the Windows Store, is that the application does not support SnapView. In case you're not familiar with SnapView, it is the mode where your app is "snapped" to a side window while another app is in use in the main FillView window.<br />
<br />
<a href="http://2.bp.blogspot.com/-rBh959I04fA/UGB5mcOtw2I/AAAAAAAABlo/IwiiBJ__g_Y/s1600/FillView.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-rBh959I04fA/UGB5mcOtw2I/AAAAAAAABlo/IwiiBJ__g_Y/s1600/FillView.png" /></a>
<br /><br />
There are easy ways to implement this in Windows 8, but one striking things about the width of our SnapView window is the fact that it is 320 pixels wide, which happens to be the standard screen width of many mobile devices in portrait mode.
<br /><br />
So if we have an existing web application that is "mobile-friendly" - meaning we've used Responsive Design and CSS Media Queries to ensure it will adapt to whatever environment it is being viewed in - this HTML code is not only portable into Windows 8, it also satisfies the SnapView requirement.
<br /><br />
That’s one of the great stories about Windows 8 HTML apps that isn’t really being played up as much as it should – the fact that portability of traditional web applications INTO a Windows 8 HTML project is fairly seamless. As a web developer, one of the things that first impressed me about Windows 8 was the ease of running a traditional HTML application within a default new Metro* HTML project. Even an app that uses jQuery or other JavaScript frameworks.
<br /><br />
After merely adding a traditional app’s .html, .css, and .js files to a new, empty Visual Studio 2012 HTML application, the only thing that prevented it from running as a full-screen Windows 8 app was the fact that the references to the WinJS javascript files needed to be added. Once these 3 JavaScript includes were added to the page, the application was instantly running full-screen, like any other Metro* application. Here are the required .js files
<br /><br />
<pre style="font-weight:bold;">
<!-- WinJS references -->
<script src="//Microsoft.WinJS.1.0/js/base.js">
</script>
<script src="//Microsoft.WinJS.1.0/js/ui.js">
</script>
<script src="/js/default.js"></script>
<link href="//Microsoft.WinJS.1.0/css/ui-dark.css"
rel="stylesheet" />
</pre>
<br />
Of course, referencing these WinJS-specific files excludes the reuse of this HTML code outside of the Windows 8 environment. But the “portability in” story is still nice – I say this as a web developer who originally came across Windows 8 as part of an experiment in HTML portability.
</div>
<div class="callout">
*I'll still be using the word Metro until there's an official term for applications that target the WinRT
</div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-33745597594448747092012-08-24T05:00:00.000-04:002012-08-24T20:37:52.345-04:00Deploying HTML5 Metro apps to the Windows Store...some common gotchas<div dir="ltr" style="text-align: left;" trbidi="on">
After going through all the effort to build a Windows 8 Metro app before the OS is released, you'd think the hard part is behind you when development is done - what with the in-progress documentation, empty Google searches, and constantly mutating API. Now it's time to deploy to the Windows Store. How hard could that be? Based on my own experiences, and insights from other early-bird developers, here's a look at some of the common offenses that will surely take you down the path of rejection:<br />
<br />
1). <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx">Read the Certification Requirements</a>. Really.<br />
2). No items in the left and right swipe margins. No exceptions.<br />
3). Buttons, in app functionality, credits, go down in the app bar or under Settings, not on screen.<br />
4). Snapview - your app has to be usable when "snapped" to the 320 pixel sidebar section in Windows 8.<br />
<br />
There are standard ways to handle the switch to Snapview in Windows 8, but for Metro HTML5/JavaScript apps you also should consider using Responsive Design, Which I'll talk about next week.</div>
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-15893787029925048182012-03-06T05:00:00.000-05:002012-03-06T05:00:09.800-05:00PhoneGap HTML5 Portability II - Chrome Web Store Hosted Apps<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://blog.danshultz.com/2012/02/html5-portability-beyond-phonegap.html">
Last week I talked about the Chrome Web Store</a> being another good high-traffic outlet for your PhoneGap HTML5 codebase. <br />
<br />
One of the first issues I encountered with my Packaged App in this new outlet was with advertising. The ads displayed just fine, as they do on the main website, except for one thing - for every click, the earnings were always $0.00. That's not good. After an exhaustive search, I came across <a href="http://code.google.com/chrome/webstore/faq.html#faq-app-05">this promising answer</a>, but still, $0.00 every time. <br />
<br />
<a href="http://www.google.com/support/forum/p/AdSense/thread?tid=42ce5e530699c918&hl=en">The actual problem</a> was that I was using a Packaged App, which essentially is your entire codebase running locally on the user's machine. It ends up that ads within a Packaged App don't have a "legitimate" source URL, according to AdSense, since it's really just local code on the user's machine. The Chrome Web Store's alternative to a Packaged app is a <i>Hosted App </i>- which is a link to the URL of your application. <br />
<br />
The Hosted App solution is not only appealing as a valid source to display ads, but from a maintainability standpoint I now have one less place to deploy to. All I need now for deployment is my manifest file and app icons - the Web Store app just piggybacks on my already-existing website.<br />
<br />
Here's a sample manifest file for a hosted app:<br />
<pre>{
"name": "My Cool App",
"description": "This is a test of the Chrome Web Store",
"version": "1.0.0.1",
"app": {
<span style="background-color: cyan; color: black;">"urls": [ </span>
<span style="background-color: cyan; color: black;"> "*://www.yourwebsite.com /mail/",
"*://www.yourwebsite.com /otherarea/"
]</span>,
<span style="background-color: yellow; color: black;"> "launch": {
"web_url": "http://www.yourwebsite.com/"
}</span>
},
"icons": {
"128": "icon_128.png"
},
"permissions": [
"unlimitedStorage",
"notifications"
]
}
</pre>
Note that you need to specify a launch URL, as well as any other non-asset URLs you'll be using. And you will need to verify that you are the owner of this site using Google's Webmaster Tools.<br />
<br />
So the quest for a solution to the AdSense problem sent me down the path of investigating Chrome Web Store "Hosted Apps", which not only resolved my advertising issue, but ended up being a better solution in general for my needs.<br />
<br />
If you're debating which type of app would work best for you, <a href="http://code.google.com/chrome/webstore/articles/apps_vs_extensions.html#pkgVsHost">here is a good comparison of Hosted vs Packaged apps</a>
</div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com027-93 S 3rd St, Columbus, OH 43215, USA39.9611755 -82.998794239.766445000000004 -83.3146512 40.155906 -82.682937200000012tag:blogger.com,1999:blog-5757598327990864100.post-55631091090565245392012-02-27T17:27:00.000-05:002012-02-28T09:42:00.209-05:00HTML5 Portability beyond PhoneGap - The Chrome Web StoreOne of the great benefits of doing mobile development using PhoneGap is the portability of the codebase. The same HTML application is easily wrapped and built for all major devices using PhoneGap and/or PhoneGap Build. And since your app is written using HTML, CSS and Javascript, you can make it accessible as a web app as well.
<br />
<br />
After I had already published a few apps to the Android Market using this technique, I read about the Chrome Web Store. And once I digested their publishing and deployment specs, I noticed that the same PhoneGap codebase could easily be deployed to this outlet as well. I re-deployed the same apps to the Chrome Web Store a few months ago, and my experience was so positive, I wanted to share a quick overview of how to deploy to this store, and some things you'll want to think about:
<br />
<br />
The deployment is simple for Chrome Web Store Packaged Apps - basically you create a .zip file of your HTML app, along with a simple .manifest file, the app icons, and preview images. Here's a sample manifest that launches splash.html at the root of your app:
<br />
<br />
<pre>{
"name": "My Cool App",
"description": "This is a test of the Chrome Web Store",
"version": "1",
<b style="background:#ffff00;color:#000000">"app": {
"launch": {
"local_path": "splash.html"
}
},</b>
"icons": {
"16": "icon_16.png",
"128": "icon_128.png"
}
}
</pre>
<br />
(<a href="http://code.google.com/chrome/webstore/docs/get_started_simple.html">Full documentation</a>)
<br />
<br />
The preview images are not required, but you'll never get very high in the rankings without them... and of course the image sizes don't match the Android Market sizings, so you'll need to create new ones. And they will not accept them until the images meet their aesthetic criteria - I had two go-arounds with them because of font sizing.
<br />
<br />
...but the pleasant surprise was the traffic:
<br />
<br />
The identical app in the Android Market after 6 months or so has about 2400 downloads, and is approaching 1000 active installs.
<br />
<br />
In the Chrome Web Store, there are 3500+ users in less than two months, and 250+ users daily, 14,000+ total. Rarely is there inactivity when using Google Analytics' real-time tools.
<br />
<br />
The manifest sample I showed was for a Chrome Web Store "Packaged App", but for my needs I found that a "Hosted App" was the better way to go - and even easier. My post next week will highlight the advantages of using a Hosted App, plus some tips on using advertising.Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-48388720406964965192011-11-22T05:05:00.000-05:002011-11-22T09:25:07.235-05:00Achieving Broad Reach with Responsive Design + PhoneGap<div dir="ltr" style="text-align: left;" trbidi="on">
The committee for <a href="http://www.m3conf.com/">The M3 Mobile Conference</a> was kind enough to allow me to speak about creating cross-platform mobile applications using PhoneGap last week, so I thought I'd share some points from the talk here.
<br />
<br />
When you need to create an application with a specific look and feel across multiple platforms and devices, PhoneGap can be the perfect tool. But before you just wrap your application up and ship it, you'll want to use <a href="http://www.webmonkey.com/2011/06/tips-tricks-and-best-practices-for-responsive-design/">Responsive Design</a> techniques to ensure all users get an appropriate experience regardless of their device. For instance, you don't want the 320 x 480 version of your app appearing scrunched to that size in the middle of an iPad, or even worse, in the upper left corner. Conversely, you don't want your beautiful iPad app scrolling horizontally and vertically on every smaller device. So you'll want to use Responsive Design to tailor your HTML5 application to as many devices as possible, and then use PhoneGap to progressively enhance the experience when viewed natively on mobile devices as well.
<br />
<br />
<a href="http://www.alistapart.com/articles/fluidgrids/">Flexible grids</a> and <a href="http://www.w3.org/TR/css3-mediaqueries/">media queries</a> are important part of implementing <a href="http://www.webmonkey.com/2011/06/tips-tricks-and-best-practices-for-responsive-design/">Responsive Design</a> in your website/application. Once the application is looking and functioning the way we want it on our desired device(s), we can use <a href="http://www.phonegap.com/">PhoneGap</a> to access additional functionality if we are being viewed on a mobile device, and <a href="http://build.phonegap.com/">PhoneGap Build</a> to automatically generate the native binaries for many smartphone devices using our single HTML5 codebase.
<br />
<br />
We're going to target Android and iPhone devices, including tablets, as well as most current web browsers, and the Chrome Web Store for our HTML application.
<br />
<div style="margin: 15px 0px 10px 0px;">
<a href="http://dl.dropbox.com/u/3858223/SpaceStationPassPredictor/index.html">
<img border="0" height="309" src="http://1.bp.blogspot.com/-vOgKKVzzNpQ/TsqijpESyYI/AAAAAAAABTQ/jE9xFRDBRwU/s400/allOutletsBlog.png" width="400" />
Our sample app (links to all versions below) is going to call </a><a href="http://code.google.com/apis/maps/documentation/geocoding/">the Google Geocode API</a> as well as the <a href="http://uhaapi.com/">Heavens Above API</a> to display viewing information for the next pass of the International Space Station based on the desired position. For <a href="http://www.alistapart.com/articles/understandingprogressiveenhancement">progressive enhancement</a>, our app will allow mobile device users to merely use their device coordinates, and allow HTML5-enabled users to have access to their history of locations using HTML5 LocalStorage.
<br />
<br />
<a href="http://build.phonegap.com/">PhoneGap Build </a>then compiles the latest version of the application checked into the Git repository, but most intrepid web developers can access all the necessary source code using any web browser.
<br />
<br /></div>
<h2>The Sample Application:<br />(All versions compiled using identical codebase)</h2>
<div class="callout">
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="https://market.android.com/details?id=com.SpaceStationFinder">Android Market version</a>
</div>
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="https://chrome.google.com/webstore/detail/dcalalddojoejbjlfjgenljkkmjfmije">Chrome Web Store version</a>
</div>
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="http://dl.dropbox.com/u/3858223/SpaceStationPassPredictor/index.html">iPhone/iPad/iPod version</a>
<br />
<div>
(Add to home screen to install)</div>
</div>
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="https://build.phonegap.com/apps/43991/share">Android native .apk</a>
</div>
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="https://build.phonegap.com/apps/43991/share">Sybian version</a>
</div>
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="https://build.phonegap.com/apps/43991/share">WebOS version</a>
</div>
<div style="font-size: 1.2em; padding-bottom: 20px;">
<a href="http://dl.dropbox.com/u/3858223/SpaceStationPassPredictor/index.html">Web version</a><br />(all browsers and devices)
</div>
</div>
Issues, feedback, suggestions most welcome - especially on the Sybian and WebOS versions.
</div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com2tag:blogger.com,1999:blog-5757598327990864100.post-73599593350893682842011-09-21T17:25:00.000-04:002011-11-22T09:27:11.934-05:00Installing Windows 8 Developer Preview on VirtualBox (and resolving error 0x8007045D)<div dir="ltr" style="text-align: left;" trbidi="on">
I was disappointed to find out that <a 09="" 16="" 2011="" archive="" b8="" b="" blogs.msdn.com="" href="http://www.blogger.com/blogger.g?blogID=5757598327990864100" http:="" running-windows-8-developer-preview-in-a-virtual-environment.aspx"="">you can't run the developer preview of Windows 8 using Microsoft Virtual PC</a>. But after reading several success stories about installing Windows 8 on Oracle's VirtualBox VM I decided to give it a try <a href="http://www.addictivetips.com/windows-tips/how-to-install-windows-8-on-virtualbox/">using this walk-through</a>. During my first attempts I was greeted with this cryptic error message each time:
<br />
<div class="callout">
"Windows cannot install the required files. Make sure all of the files required for installation are available, and restart the installation. Error code: 0x8007045D".</div>
This error would appear during the second step in the Windows 8 installation process, right after "Expanding Windows Files..." hit about 80%.
After researching VirtualBox settings, I found that the <a href="http://thaiwinadmin.blogspot.com/2011/09/error-0x8007045d-when-install-windows-8.html"> first English comment on the bottom of this post</a> resolved my issue. (So it's worked for at least two people now).
<br />
<br />
Basically, the fix is to make sure to check "Use host I/O cache" under Admin...Storage...(highlight SATA Controller):
<br />
<div style="clear: both; margin: 20px; text-align: center;">
<img border="0" src="http://2.bp.blogspot.com/-G5rr3ytF1jU/TnpQiMftxFI/AAAAAAAABB4/7PKGnE5hjR4/s1600/win8error.png" />
</div>
Once I changed this setting Windows 8 installed just fine, and the "Expanding Windows Files..." step of the installation took about 1 minute, compared to 15-20 minutes during the failed installations.
</div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com4tag:blogger.com,1999:blog-5757598327990864100.post-28859677981208765002011-08-16T05:00:00.059-04:002011-08-17T08:55:04.346-04:00Sitefinity 4 News Items Not Displaying Author NameWe just got through a minor issue involving NewsItems in a Sitefinity 4.1 implementation. The problem is that even though the administrators were specifying an author when creating NewsItems, THEIR NAME was being displayed instead of the author no matter what.<br />
<br />
The solution is actually pretty straightforward - The layouttemplate for news items doesn't contain a field for author, even though it's entered on the back end. Instead it uses <span style="color:#dddddd"><sf:personprofileview runat="server"></span> which displays the first name and last name of the user posting the NewsItem. You'll have to go into the LayoutTemplate for single NewsItems (Design..WidgetTemplates...FullNewsItem in Sitefinity admin) and replace the personprofileview tag with the author name:<br />
<br />
<span style="font-weight:bold;">Default layouttemplate code:</span><span style="color:#ccc"><br />
<div class="sfnewsAuthorAndDate"><br />
<asp:literal runat="server" text="<%$ Resources:Labels, By %>"> <br />
</span><span style="color:#000000;font-weight:bold;"><sf:personprofileview runat="server"></span><span style="color:#ccc">|<sf:fieldlistview format="{PublicationDate.ToLocal():MMM dd, yyyy}" id="PublicationDate" runat="server"><br />
</sf:fieldlistview><br />
</div><br />
</span><br />
<span style="font-weight:bold;">Revised:</span><br />
<span style="color:#ccc"><div class="sfnewsAuthorAndDate"><br />
<asp:literal runat="server" text="<%$ Resources:Labels, By %>"> <br />
</span><span style="color:#000000;font-weight:bold;"><asp:Literal runat="server" Text='<%# Eval("Author")%>' /></span><span style="color:#ccc"> | <sf:fieldlistview format="{PublicationDate.ToLocal():MMM dd, yyyy}" id="PublicationDate" runat="server"><br />
</sf:fieldlistview><br />
</div><br />
</span><br />
Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-33553552874393298002011-08-10T05:00:00.009-04:002011-08-15T14:05:12.207-04:00ASP.Net Duplicate Section Defined Error - Is Only Defined OnceI had just set up a new local development environment for a solution already up and running in a staging environment. <br />
<br />
The first time I tried to run the app, I got this error message:<br />
<div class="callout">Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section<br />
</div>Here are the exception details:<br />
<div style="background-color:#ffffaa;font-style:italic;color:#000000;padding:15px;"><span style="color:#ff0000;font-weight:bold;">HTTP Error 500.19 - Internal Server Error</span><br />
The requested page cannot be accessed because the related configuration data for the page is invalid.<br />
Detailed Error Information<br />
Module IIS Web Core<br />
Notification Unknown<br />
Handler Not yet determined<br />
Error Code 0x800700b7<br />
Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined<br />
Config File \\?\C:\SVN\TestSite\web.config<br />
</div><br />
...but if you look in the web.config, the scriptResourceHandler is only defined once. However, if you're using .Net Framework 4.0, this entry already exists in the machine.config - hence the error. So the solution is, either remove this and other duplicate entries from your web config, or if it's an option, change your site in IIS from using the Framework 4.0 application pool back to the Framework 2.0 application pool.Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-83620353133358972442011-08-04T12:11:00.003-04:002011-08-16T10:14:21.387-04:00Creating a Sitefinity 3.7 Custom ControlDesignerHere’s a simplified summary of the process of creating a custom designer to edit properties for a Sitefinity control:<br />
<div class="callout">For simple text fields, edit fields are automatically generated just by exposing properties of type string on the user control.<br />
</div>...but for an elaborate field editing interface on a Sitefinity control here's a diagram and overview:<br />
<div style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-xu1dWo4zKWo/TjrCznNPe1I/AAAAAAAAA-Y/JfVQm5mTa54/s1600/BlogCustomDesigner.png" imageanchor="1" style=""><img border="0" src="http://2.bp.blogspot.com/-xu1dWo4zKWo/TjrCznNPe1I/AAAAAAAAA-Y/JfVQm5mTa54/s1600/BlogCustomDesigner.png" /></a></div>(apologies for the VB code :))<br />
In App_Code<br />
<span style="color:#ffbbbb;">BaseControl</span>.cs (contains the properties on our usercontrol we need to edit)<br />
Inherits UserControl<br />
<span style="color:#ffffbb;">ControlDesigner</span>.cs (control displays the editing UI and sets the properties on <span style="color:#ffbbbb;">BaseControl</span>)<br />
Inherits Telerik…ControlDesigner<br />
<br />
The control itself must inherit from <span style="color:#ffbbbb;">BaseControl</span>.cs - this later allows it to be cast to type DesignedControl from the <span style="color:#ffffbb;">ControlDesigner</span>.<br />
<br />
It must also have a control designer specified as a class attribute. ex:<br />
[Telerik.Framework.Web.Design.ControlDesigner("<span style="color:#ffffbb;">ControlDesigner</span>")]<br />
<br />
To layout the UI for the Control designer, you need to create a separate <span style="color:#ffbbff;">LayoutTemplate</span> user control, and specify it’s path as the <span style="color:#ffffbb;">ControlDesigner</span>’s LayoutTemplatePath property.<br />
<br />
The <span style="color:#ffffbb;">ControlDesigner</span> references the <span style="color:#ffbbff;">LayoutTemplate</span>’s properties like: <br />
base.Container.GetControl<literal>("litDataString", true)<br />
<br />
and sets the property on the usercontrol like:<br />
((DesignedControl)<span style="color:#ffbbbb;">BaseControl</span>).Data = “xyz” <br />
<div class="callout">For simpler, unstyled layouts, you can get away without a <span style="color:#ffbbff;">LayoutTemplate</span> and just specifying the controls’ positions via css in the <span style="color:#ffffbb;">ControlDesigner</span>.<br />
</div>Here’s a more in-depth <a href="http://www.sitefinitywatch.com/blog/09-02-17/Accessing_Underlying_Properties_with_Control_Designers.aspx">Sitefinity walk-through and sample code.</a>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-16060174475716567462011-06-28T23:28:00.003-04:002011-06-28T23:35:59.222-04:00Sitefinity 4.1 problem uploading images with admin toolsWe suddenly encountered an issue when uploading images using the Sitefinity 4.1 back-end admin tools. Now suddenly, when the content creators attempted to upload an image, they were suddenly getting a 404 error with the message:<br />
<span style="color:#ffaaaa"><br />
Please review the following URL and make sure that it is spelled correctly.<br />
Requested URL:<br />
/Telerik.Sitefinity.AsyncImageUploadHandler.ashx</span><br />
<br />
...Of course this functionality worked just fine in the development environment. The entire site was republished to staging, but they still were experiencing this issue of not being able to locate AsyncImageUploadHandler.ashx.<br />
<br />
After examining everything, it ends up that there were several new httphandlers added in the system.webServer section in the local web.config that needed to be added to the staging site's config, specifically in this case the missing offender was:<br />
<span style="color:#ffaaaa"><br />
<add name="Telerik.Sitefinity.AsyncImageUploadHandler" path="Telerik.Sitefinity.AsyncImageUploadHandler.ashx" verb="*" type="Telerik.Sitefinity.Modules.Libraries.Web.AsyncImageUploadHandler, Telerik.Sitefinity" /><br />
</span><br />
I assume these settings were added when we upgraded to 4.1, SP1. According to the <a href="http://www.sitefinity.com/documentation/installation-and-administration-guide/upgrading-sitefinity-projects.aspx">upgrade instructions</a>, upgrading locally and then publishing everything except the Sitefinity configuration files to staging will automagically update the remote site to SP1. But you also need to make sure to merge the updates to your web.config as well.Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com0tag:blogger.com,1999:blog-5757598327990864100.post-747369811459156112011-06-21T16:10:00.002-04:002011-08-16T15:42:35.920-04:00Referencing Sitefinity 4.1 Themes, CSS From External Pages<div dir="ltr" style="text-align: left;" trbidi="on">Global styling in Sitefinity 4+ is handled by <a href="http://www.sitefinity.com/documentation/designers-guide/creating-a-theme/registering-a-theme.aspx">creating and registering a theme</a>, and then applying it using the admin tool to your Sitefinity page templates:<br />
<br />
<div style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-HnA5PDhi-WY/TgDxi13qA2I/AAAAAAAAAro/jtoYvYg-h6U/s1600/SetTheme.png" imageanchor="1"><img border="0" height="217" src="http://4.bp.blogspot.com/-HnA5PDhi-WY/TgDxi13qA2I/AAAAAAAAAro/jtoYvYg-h6U/s400/SetTheme.png" width="400" /></a></div><br />
Pretty easy, but what about if you need to reference that style sheet from an external web page that wasn't created within Sitefinity? Or to reference it right from the markup of your page templates/master pages? Looking at the solution the path will be something like:<br />
<span style="color:#ccffcc;"><br />
/App_Data/Sitefinity/WebsiteTemplates/HomePage/App_Themes/Teal/Global/main.css<br />
</span><br />
But we know the ASP.Net App_Data folder has special permissions that will not allow us to directly reference files within it... if we try to use this path to reference the stylesheet, we'll get a 403 error.<br />
<br />
Fortunately, after you register a theme, Sitefinity will automatically re-route directly from the /Sitefinity folder at the root of the application into the /Sitefinity folder that exists at /App_Data/Sitefinity... kind of a client-side backdoor into your themes and templates.<br />
<br />
So the easy answer to referencing your Sitefinity themes client-side, is just remove the "/App_Data" from the path. You can see this pathing structure if you look at the source code of your Sitefinity pages as well - example:<br />
<br />
<span style="color:#ccffcc;"><link href="</span><span style="color:#ffff33;">/Sitefinity/WebsiteTemplates/HomePage/App_Themes/Teal/global/main.css</span><span style="color:#ccffcc;">" type="text/css" rel="stylesheet" /></span><br />
<br />
</div>Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com1tag:blogger.com,1999:blog-5757598327990864100.post-2947036264607218082011-06-02T13:45:00.012-04:002011-06-15T11:39:44.493-04:00Sitefinity 4 "ExceptionManager Cannot be Constructed" errorIf you're using Sitefinity 4.x and suddenly begin seeing this curious ASP.Net error:<br /><span style="color:#ffaaaa;"><br />"The type ExceptionManager cannot be constructed. You must configure the container to supply this value."</span><br /><br />...this error results when the App_Data folder, and files within, are marked Read Only - if you're using TFS for source control, make sure your App_Data folder has been Checked Out. Your app should then launch normally.Dan Shultzhttp://www.blogger.com/profile/07055779184289832421noreply@blogger.com1