Visual studio feeds

All Visual Studio blogs in one place


Enter your email address:

Delivered by FeedBurner

Increase your website traffic with



Anti-spam: How many eyes has a typical person?

Follow us on FB


KO binding for two SharePoint rich text editor controls

AddThis Social Bookmark Button
  For a while now, I've been experimenting with a simple HTML editor for my forms.  Something to work with JavaScript databinding, in my particular case, KnockoutJS.   Why not TinyMCE and CKEditor?   But both libraries wants me to embed a bunch of additional 10-20 files.  I'm trying to build an App, which means packaging my assets.  I'm not going to package 20 files.  Additionally, both TinyMCE nor CKEditor has official support for KnockoutJS binding anyway.  You end up on StackOverflow using someone's binding code.   An idea strikes!
Why not just use SharePoint's Rich Text Editor controls?  As long as you can create an ASPX page, you can use these controls that are out of the box.  As long as I don't postback, it doesn't matter what's the value inside of the controls.   SharePoint InputFormTextBox     Knockout Two-Way Binding:   ko.bindingHandlers.spInputFormTextBox = {
    init: function (element, valueAccessor, allBindingsAccessor, context) {
        var modelValue = valueAccessor();
        var value = ko.utils.unwrapObservable(valueAccessor());...(Read whole news on source site)

Postgresql as a Nosql Document Store

AddThis Social Bookmark Button
Postgresql makes a fairly decent schemaless Nosql document database. It is the only database I can think of that: is mature is fast has an extensive plugin ecosystem has ACID compliance supports schemaless document storage supports relational data storage can join across documents and relational data can index into documents as well as relational data has built-in full text search Postgres already had most of this. The only thing they had to add to facilitate document storage was a json data type and the ability to create indexes on json properties. An Example If I want to store Person documents I might create a table called Person with a
json column to hold the document: create table Person ( data json NOT NULL ); The documents will have a unique identifier _id which I need to be able to query on, so I add an index: CREATE UNIQUE INDEX people_id ON Person ((data->>'_id')); Then the query to select a document is: select data from Person where data->>'_id' = 'A158CCB9-BB68-4FC2-8123-79B32053B2A3' Better Tooling A typical application scenario will make changes to multiple documents. We can take advantage of Postgres’s transaction support by accumulating changes and commiting them within the same transaction. If there are no problems then the changes are persisted, but if something goes wrong the entire...(Read whole news on source site)

Advanced Memory Dump Debugging

AddThis Social Bookmark Button
Originally posted on: common thing while debugging is to search who owns/references a handle. For x86 processes you can simply search the full address space but in x64 this approach no longer works. While debugging a hang from a memory dump I did find out that the process MainWindowHandle did change to a different window which was not the main window handle. Searching for the values of NativeWindow objects did also lead to no trace on the managed heap so it must be some unmanaged window handle. First I look at the Process objects which could
contain interesting data 0:033> !DumpHeap -type System.Diagnostics.Process -stat Statistics: MT Count TotalSize Class Name 000007fef3c7d090 1 24 System.Diagnostics.ProcessModuleCollection 000007fef3c76470 1 24 System.Diagnostics.ProcessThreadCollection 000007fef3c62c70 1 64 System.Func`2[[System.Diagnostics.Process, System],[System.Boolean, mscorlib]] 000007fef3c47718 ...(Read whole news on source site)

The Future of Jobs

AddThis Social Bookmark Button
Will you have a job in the future? What will that job look like and how will the nature of work change? Will automation take over your job in the near future? These are the kinds of questions that Ruth Fisher, author of Winning the Hardware-Software Game, has tackled in a series of posts. I wrote a summary post to distill her big ideas and insights about the future of jobs in my post: The Future of Jobs Fisher has done an outstanding job of framing out the landscape and walking the
various arguments and perspectives on how automation will change the nature of work and shape the future of jobs. One of the first things you might be wondering is, what jobs will automation take away? Fisher addresses that. Another question is, what new types jobs will be created? While that’s an exercise for the reader, Fisher provides clues based on what industry luminaries have seen in terms of how jobs are changing. The key is to know what automation can and can’t do, and to look at the pattern of work in terms of what’s...(Read whole news on source site)

Continuous Deployment - Remote execution of PowerShell scripts from your build process

AddThis Social Bookmark Button

Including Windows PowerShell script as part of your build and deployment process, brings you the flexibility of easily and effectively customize your packaging and deployment process. With the proper combination of environment configuration files (XML) and PowerShell scripts you can achieve the impossible. This post will show you how to run Windows PowerShell scripts remotely from a TFS build process.
Using CredSSP for second-hop remoting

One common issue with PowerShell remoting is the “double hop” problem. When the scripts are executed remotely on a Server A and then it tries to connect from Server A to Server
B, the second connection fails to send the credentials to that server. As a result the second server fails to authenticate the request and rejects the connection. To get around this issue you need to use the CredSSP authentication mechanism in PowerShell.
Credential Security Service Provider (CredSSP) is a new security service provider that is available through the Security Support Provider Interface (SSPI) in Windows. CredSSP enables an application to delegate the user’s credentials from the client (by using the client-side SSP) to the target server (through the server-side SSP).
To setup the machines, for CredSSP you can follow the below given...(Read whole news on source site)

O’Reilly Deal of the Day 29/September/2014 - Developing Responsive Web Applications with AJAX and jQuery

AddThis Social Bookmark Button
Originally posted on:’s half-price deal of the Day from O’Reilly at  is Developing Responsive Web Applications with AJAX and jQuery. “Developing Responsive Web Applications with AJAX and jQuery will empower you with the skills required to create responsive web applications in a quick and efficient manner. The book begins by identifying the key benefits of a responsive application for a commercial site, and then covers how to develop a layout using Bootstrap 3 and adding dynamic visuals to your web application using AJAX calls.”

Now 5 bodies in the Solar System with rings!

AddThis Social Bookmark Button
Originally posted on: some years we have known that Jupiter, Saturn, Uranus and Neptune all have ring systems but recently one of the asteroids, Chariklo, was found to have a ring system as well! Details are at “The discovery of rings around asteroid Chariklo last year - depicted in this artist’s impression - drove home the important message that the solar system is still full of plenty of surprises. (Image credit: ESO/L. Calçada/M. Kornmesser/Nick Risinger)”

Be-Aware of differences in explicit and implicit deserialization with DCS

AddThis Social Bookmark Button
DataContractSerializer (DCS) is the class that is used by WCF to serialize and deserialize messages when you make service calls. It is also sometimes used on its own to read and write objects to a stream, such as inside the WinRT SuspensionManager class. It works great and is very powerful, even being able to handle … Continued

Code from your fellow developers

AddThis Social Bookmark Button
It's almost a law: whenever you take over code from another developer, you start to moan and complain about the state of that code. It's awful, terrible, the worst piece of code you've ever seen. I am no exception. However, when I took over some code from a colleague who left the company I found this gem. I think I am right in complaining about this piece of code. (FYI this is almost an exact copy of what I found in the codebase, except for it being an console application and the classnames…) namespace ConsoleApplication9 {     class Program     {         static void Main(string[] args)         {             Customer customer = new Customer();             customer.Id = 42;              Order order = new Order();             order.Id = 64;              customer.Save(order);         }     }      public class SaveableEntity     {         public int Id { get; set; }          public void Save(SaveableEntity entity)         {             entity.Id = Id;             SaveService.Save(entity);             this.Id = entity.Id;         }     }     public class Customer : SaveableEntity     {         //...     }      public class Order : SaveableEntity     {         //...     } }  Now, please tell me what you think of