Kendo UI has an excellent drag and drop framework. Although it has a nice API and is very capable, I found it a bit difficult to understand due to the disconnected implementation between the drag and the drop. There are two separate widgets to create a single drag and drop action: one is the kendoDraggable widget and the other is the kendoDropTarget.

For example, if you would like to allow boxes to be dragged into a designated area, you would do something like this:


Notice you have two widgets: the first one wires up the boxes to enable ...
The default examples provided by Kendo are an excellent starting point for understanding how to implement it in your project. However, they cannot cover every scenario. One particularly common scenario is the need to send JSON data to fulfill a parameter. The dataType attribute applied to your data source or even your jQuery ajax call determines the format of the data it receives not what it sends. By default both methods send 'post' data to a controller as form data and 'get' as a querystring value. This is fine for simple requests that contain strings, integers, etc. But what if ...

Introduction

Last time I talked about the sin of Overly Chatty Queries and pointed out two other sins while showing an example of an Overly Chatty Query and how to fix it. One of those sins was the sin of Too Many Columns, and that's what I'm going to discuss this time.

Confession

Here is the code snippet I showed last time which demonstrates how to eagerly load entities, ensuring you have all the data you need in a single query rather than requiring an additional query per loop iteration:

01.var orders =
02.    from order in Orders.Include(o ...
Recently Sitefinity.com updated their site and with it came a change to their landing page slider. The slider has a looping HTML5 video playing in the background behind an interactive content slider. I thought the video idea was pretty neat so I sought to replicate it in the form of a Sitefinity layout widget.

I'm sure the idea of having a video background may be terrifying to some with concerns to page load times and bandwidth consumption, however, if you take a look at the video used by Sitefinity you will notice that it is actually only a few hundred ...

JavaScript is fun language. Some of its rules provide developers with the ability to use shortcuts when writing code. Here are a few of my favorites.

|| as a null coalescing operator

A null coalescing operator returns the value to its right only if the value to its left is null. Here is an example of a null coalescing operator (??) in C#:

1.public string ToCsv(IEnumerable<string> values)
2.{
3.    values = values ?? Enumerable.Empty<string>();
4.    return String.Join(",", values);
5.}

JavaScript does not have a null coalescing operator but we ...

As we saw in the previous post, you can override the default MVC Views of the Falafel Dashboard Widgets for Sitefinity that are served from the Embedded Resources of the assembly. But how did we get the views there in the first place, and how do we serve them to the Sitefinity widgets while allowing them to be overridden with the physical files?

That's what we will be exploring today.

Embedded Resources

The first step is of course to embed the views inside the assembly. This is as simple as adding the views to the assembly project, and setting ...

Remember in my previous blog how we created a simple way to download the data from a Kendo Grid into a spreadsheet using csv?  Well, there is just one problem – it won’t work in mobile Safari.  This means that if you are viewing the Kendo Grid on an iPad, the spreadsheet generation will fail!  And that is too bad because if our site is Kendo-based it already looks great on the iPad, and a simple csv would be pretty darn useful.

The problem is with the Blob support in mobile Safari.  We used Blob.js to make sure we could ...

What are fixed position headers?

A common navigation paradigm now a days, thanks to Bootstrap, is “fixed navigation headers”. In this paradigm the navigation elements of the website are in a fixed position generally fixed to the top of the browser screen. See below for an illustration -

Fixed_At_Top

See the header above and the content starts after that. And when you scroll to see more content

Fixed_At_Top_After

The content scrolls but header stays where it is.

Why is it a problem in Sitefinity’s context?

Now this presents a tricky problem when dealing with templates in Sitefinity. If I were use ...

When using MVVM in Kendo UI Mobile, there are times where you will need the context of the view so you can make changes to it or read values from it. You can get the current view from the application's "view()" method, but sometimes your app is not in the global namespace if you architected it this way. Unfortunately, this does not come as a parameter for your observable functions. So here's the trick to finding the current view:

<div id="home" data-role="view" data-model="viewModel">
    <a href="#" data-bind="click: doSomething">Do something with the ...

One of the solution to capture video with a USB camera is using Microsoft Expression Encoder 

After adding references to these required assemblies

Microsoft.Expression.Encoder
Microsoft.Expression.Encoder.Types
Microsoft.Expression.Encoder.Utilities

            var videoDevices = EncoderDevices.FindDevices(EncoderDeviceType.Video);
First you receive a collection of available video capture devices  
and start a live job method for the encoder
 video = videoDevices[videoDeviceIndex];
_job =  new LiveJob();
  
  // Create a new device source. We use the first audio and video devices on the system  
  _deviceSource = _job.AddDeviceSource(video, audio);
  
  _deviceSource.PickBestVideoFormat(new Size(640, 480), 15);
  // Get the properties of the device video  
  SourceProperties sp = _deviceSource.SourcePropertiesSnapshot();
  // Resize the preview panel ...

Last week, Falafel released the new Dashboard Widgets for Sitefinity, allowing you to easily add 11 new widgets to the administration dashboard for Sitefinity 6.2+. The widgets are easy to use and provide valuable information at a glance. But did you know they're also highly customizable?

Because these widgets are built with ASP.NET MVC, you can modify the View templates of each individual widget to change the layout to suit the visual needs of your site. In this post we'll take a look at how you can achieve this. In a later post, we'll look at the technical details ...

In this video I describe the basics of image correlation. I actually wrote these utilities over 15 years ago in Delphi. That's the cool thing about math, it's timeless. It doesn't matter what you write it in.    


Links 
Statistical Functions
Image Correlation
Proof of Concept (Windows 8.1)      

Image Correlation Function Details in C#

Falafel Dashboard

Falafel Software is excited to announce the newest release of the Falafel Dashboard for Sitefinity MVC! We’ve updated the architecture to work alongside the official 6.2 dashboard, allowing us to complement the existing widgets with the Falafel widgets. We also now have the ability to show data from all modules, including the dynamic custom widgets for ContentStats and Comments. This is now available to download for Sitefinity 6.2 on.

Share this news!

The best part? The dashboard widgets are now fully self-contained, and do not rely on any external dependencies or files. This means users don’t have to ...

When I first started working with iOS, the most difficult thing for me to grasp was the UI of the application. Not necessarily the widgets themselves, but implementing the MVC based navigation patterns and populating the UITableView - which is the staple of iOS data display and app navigation. You may have expected me to say Objective-C, well yes, that was a challenge, but I now have Xamarin.iOS to deal with that, and all my iOS code can be written in C#.

Even with Xamarin.iOS and C#, populating a UITableView can be a daunting task, fraught with delegates (the iOS ...
If you are not using Underscore.js in your JavaScript development, then you are really missing out. It cuts out so much redundant functions you find yourself creating when dealing with collections, objects, and conditions, such as finding, filtering, plucking, and so much more. You will instantly see the power of Underscore.js by examining this example:

var stooges = [{name: 'moe', age: 40}, {name: 'larry', age: 50}, {name: 'curly', age: 60}];
 
_.pluck(stooges, 'name');
 
=> ["moe", "larry", "curly"]

It is simply "plucking" out the "name" property from the ...

What is Dynamic Linq anyway?

Dynamic LINQ has been around in the .NET space for a while. To know more about what Dynamic Linq is and how to use it in general (out of Sitefinity) please head to Scott Gu's post. Now lets learn about Dynamic Linq in Sitefinity’s context.

Sitefinity has implemented its own version of Dyanmic Linq under Telerik.Sitefinity.Data.Linq.Dynamic namespace. In this post we will see how you, the reader, can you Sitefinity’s Dynamic Linq and filter List Items based on classification.

Why would I need Dynamic Linq?

Dynamic Linq as Scott Hanselman describes makes custom Linq ...

Falafel Bridge for TestComplete 

We are so excited to announce the release of Falafel Bridge for TestComplete, now
available in the Xamarin Marketplace! The Falafel Bridge for TestComplete component allows Xamarin.Android apps to be white-box tested with SmartBear's TestComplete 10 product. We’ve been adoring fans of TestComplete for twelve years now, and when we saw that TestComplete had Android testing capabilities, we were jumping with joy. Turns out however it sadly doesn’t work with Xamarin built android apps, and we wanted to fix that. Check out the demo below!

Building your Xamarin.Android app with this component and calling a simple initialization routine ...

Introduction

I love using LINQ to filter, transform, and aggregate collections. LINQ provides a very concise and expressive syntax that lets you do more with fewer lines of code, which in turn means generally higher productivity, reduced maintenance, and fewer bugs. However, all of these things are unconditionally true only regarding in-memory collections. When it comes to querying a relational DB, LINQ has a dark side: it’s almost too good at hiding what’s really happening. This could cause a naïve developer to write poor data access code, because a query that accesses a DB is almost indistinguishable from one that ...

A key, but often overlooked aspect of LINQ is that execution of query statements is deferred until you actually ask for the first item in the sequence.shutterstock_123517828

Consider this code,

var list = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

var query = from num in list
    where num < 7
    select num;
// other code here
foreach ( var num in query ) { Console.WriteLine(num); }

C# applications typically execute from top to bottom.  You might, therefore, reasonably expect that the query would run right after the declaration of the list.  It turns out, ...

If you are using Kendo UI and need a widget for selecting an item from a list, you have a few options: DropDownList, ComboBox, and AutoComplete.  DropDownList requires you to select one of the items from the list, but the keyboard support is fairly cumbersome--the user needs to enter text quickly in order to jump to that item in the list.
The ComboBox allows users to enter text as if it was a text box, but it doesn't force them to match one of the values in the list--it allows custom text.
What I'm looking for is ...