Symptom: A weird error such as:
error FS0001: This expression was expected to have type
'FSI_0011.MyType'
but here has type
'FSI_0012.MyType'
| static async IAsyncEnumerable<T> UnFold<T, TAcc>(Func<TAcc, Task<(bool Next, IAsyncEnumerable<T> Values, TAcc Acc)>> f, TAcc seed) | |
| { | |
| var acc = seed; | |
| var result = default((bool Next, IAsyncEnumerable<T> Values, TAcc Acc)); | |
| do | |
| { | |
| result = await f(acc); | |
| await foreach (var value in result.Values) | |
| yield return value; |
| #r "System.Xml.Linq" | |
| open System | |
| open System.IO | |
| open System.Xml.Linq | |
| let script = seq { | |
| //TODO: this currently loads fsproj's in alphabeticall order, we should instead | |
| //build the dependencies graph of the fsproj's and load them in topological sort order |
| (function() { | |
| d3.force_labels = function force_labels() { | |
| var labels = d3.layout.force(); | |
| // Update the position of the anchor based on the center of bounding box | |
| function updateAnchor() { | |
| if (!labels.selection) return; | |
| labels.selection.each(function(d) { | |
| var bbox = this.getBBox(), | |
| x = bbox.x + bbox.width / 2, |
| /** | |
| * WkHtmlToPdf table splitting hack. | |
| * | |
| * Script to automatically split multiple-pages-spanning HTML tables for PDF | |
| * generation using webkit. | |
| * | |
| * To use, you must adjust pdfPage object's contents to reflect your PDF's | |
| * page format. | |
| * The tables you want to be automatically splitted when the page ends must | |
| * have a class name of "splitForPrint" (can be changed). |
If you're using [ASP.NET MVC3][], it uses [jQuery Validate][] to do client-side validations. Instead of using [jQuery Validate][] directly, however, it wraps it with its own jQuery plugin called [jQuery.Validate.Unobtrusive][]. [jQuery.Validate.Unobtrusive][] sets up [jQuery Validate][] for you, behind the scenes, so you don't have an opportunity to customize your [jQuery Validate][] settings at all!
We've been running into trouble with this when we've been doing our own custom client-side validations. We need a way to integrate with the build-in [ASP.NET MVC3][] validation so we can:
| function onErrors(form, validator) { // 'this' is the form element | |
| var container = $(this).find("[data-valmsg-summary=true]"), | |
| list = container.find("ul"); | |
| if (list && list.length && validator.errorList.length) { | |
| list.empty(); | |
| container.addClass("validation-summary-errors").removeClass("validation-summary-valid"); | |
| $.each(validator.errorList, function () { | |
| $("<li />").html(this.message).appendTo(list); |