Tag | API Posts

Good things are hard to kill. One of the most useful predefined compiler macros in C/C++ were __FILE__ and __LINE__ which do expand to the compilation units file name and line number where this value is encountered by the compiler. After 4.5 versions of .NET we are on par with C/C++ again. It is of course not a simple compiler expandable macro it is an attribute but it does serve exactly the same purpose. Now we do get CallerLineNumberAttribute == __LINE__ CallerFilePathAttribute == __FILE__ CallerMemberNameAttribute ...
Have you ever had the need to implement a 3rd party JavaScript plugin, but your needs didn’t fit the model and usage defined by the API or documentation of the plugin? Recently I ran into this issue when I was trying to implement a web snapshot plugin into our site. To use their plugin, you had to include a script tag to the plugin on their server with an API key. The second part of the usage was to include a <script> tag around a function call wherever you wanted a snapshot to appear. The ...
At http://shop.oreilly.com/cat... O'Reilly are offering a series of books on geo-location at 50% off until April 5, 2012 14:00 PT. HTML5 Geolocation Truly revolutionary: now you can write geolocation applications directly in the browser, rather than develop native apps for particular devices. This concise book demonstrates the W3C Geolocation API in action, with code and examples to help you build HTML5 apps using the "write once, deploy everywhere" model. Along the way, ...
For the last decade, I have repeatedly, in my imitable Microsoft fan boy style, offered an alternative view to commonly held beliefs about Microsoft's stance on open source licensing. In earlier times, leading figures in Microsoft were very vocal in resisting the idea that commercial licensing is outmoded or morally reprehensible. Many people interpreted this as all-out corporate opposition to open source licensing. I never read it that way. It is true that I've met individual employees of Microsoft ...
Financial Apps feel the need for speed – this can come via parallelization, and via infrastructure - fast messaging and non-blocking distributed memory management. This blogpost gives an overview + examples of various technologies that can squeeze performance out of your trading apps and clock cycles out of your modeling apps. Low Latency via Infrastructure ZeroMQ · ZeroMQ is a messaging library - ‘messaging middleware’ , ‘TCP on steroids’ , ‘new layer on the networking stack’. not a complete messaging ...
Today's deal of the day from O'Reilly Press at http://shop.oreilly.com/pro... is Programming Entity Framework: DbContext "The DbContext API captures Entity Framework’s (EF) most commonly used features and tasks, simplifying development with EF. This concise book shows you how to use the API to perform set operations with the DbSet class, handle change tracking and resolve concurrency conflicts with the Change Tracker API, and validate changes to your data with the Validation API." ...
Shims help when adding semantic tags to older IE browsers, but there is a huge range of other new HTML5 features that having varying support on browsers. Polyfills are the tool to work with many of these new features. Polyfills are JavaScript code and/or browser plug-ins that can provide older or less featured browsers with API support for recent browser advances. The best polyfills will detect the whether the current browser has native support for a given feature, and only adds the functionality ...
Programming Direct3D requires understanding of where different types of resources are bound to the shader pipeline. The shader pipeline consists of configurable fixed function stages (Input Shader, Tessellator, Stream Output, Rasterizer, Output merger), and opt-in HLSL programmable shader stages (Vertex Shader, Hull Shader, Domain Shader, Geometry Shader, Pixel Shader, Compute Shader). Passing data into shaders involves creating & binding resources to the pipeline in C++ on CPU, so that HLSL ...
As many of us deploy our shiny web services and expose them to the world (or just our apps), we invariably encounter these pesky maintenance windows. During these times, a database, other web services or any other IO dependent tasks cannot be performed. Wouldn't it be nice to tell the caller of your web API that the operation is currently unavailable? It can get pretty ugly if we don't solve this. If we simply bring down the whole endpoint, connecting clients will experience a pile-up of timed out ...
During the upgrade of a solution from the Web Api Preview 6 to MVC 4 Beta Web Api, I encountered a bug with a custom MediaTypeFormatter. In the Api controller I had a need to take the posted content object as well as some string identifiers/keys as parameters. The problem I encountered as that if I utilized a custom MediaTypeFormatter, these values came in as NullTake the following Api controller Post: // POST /api/values public HttpResponseMessage<Some... Post(string key, string id, SomeObject ...
The most recent release of LINQ to Twitter included support for Windows Phone. It’s important to note that only 7.1 is supported – the rationale being that 7.1 (Mango) introduced support for IQueryable, which LINQ to Twitter requires. This post will show you how to use LINQ to Twitter with Windows Phone. You’ll see a normal public query, how to log in with OAuth, and how to post a tweet. All of the code in this blog post is included with the LINQ to Twitter source code that you can download at http://linqtotwitter.codepl... ...
For those of you that missed it, Rob Conery offered a challenge a couple nights ago to build an API for Tekpub. In response to this, a few different developers took the opportunity to propose their solution to the requirements. One of those developers, John Sheehan, offered his solution entitled, Don’t build the best REST API, build the best HTTP API and tweeted that the title might be a bit linkbaitish. I understood the point he was trying to make and I think he did a fine job. Building an API should ...
After upgrading to the MVC 4 Web Api a problem came up where the custom MediaTypeFormatters we were using were no longer functioning.You must now override, CanWriteType and CanReadType in your customer formatter, or it will return false by default. 'Headers.ContentType' must be set before 'ObjectContent' can serialize its content"vIdeally, some checks would be made here to determine if you truly can read or write the type..but for this example, return true.Throwing the following error: /// <summary> ...
I have been wanting to talk for a while about the approach we take to analysis of an application we are about to integrate with. In the past I have seen a lot of cases where analysis is undertaken by looking at the interface specification documents from an application vendor and then taking their contract (which hopefully is standards based) reading them numerous times and then we plough into the development. The big problem with this is that we make a number of assumptions about the application ...
Few days ago I have received an invitation from Packt Publishing to review this book. I myself is a big fan of Generics and is very interested about it, so I've decided to give it a go. Thank you for letting me review this interesting book. .NET 4.0 Generics (Packt Publishing) is written by Sudipta Mukherjee. The book is primarily targeted to beginners and intermediate programmers who want to know what .NET Generics is all about and how it can help solved real world problems. The book covers the ...
One of the new data controls in Windows 8 Metro is the ListView. The ListView does the same thing as the ListBox, plus more. In this post, I’ll build on the TwitterClient, from my previous post: Windows 8 Composition and Content. and show how to refactor the ListBox to a ListView. I’ll also mention a few of the differences between the two controls. Refactor ListBox to ListView To save you a little time, I’ll show you the XAML for the ListBox, from my previous post. Then I’ll follow up with changes ...
This blog provides links to a presentation and a sample application that shows how to load data in SQL Azure using different techniques and tools. The presentation compares the following techniques: INSERT, BCP, INSERT BULK, SQLBulkCopy and a few tools like SSIS and Enzo Data Copy. The presentation contains load tests performed from a local machine with 4 CPUs, using 8 threads (leveraging the Task Parallel Library), to a SQL Azure database using the code provided below. The test loads 40,000 records. ...
Architecture of PeopleSoft Adapter: The BizTalk PeopleSoft Adapter is based on the BizTalk Server Adapter Framework. More info: How the Adapter Is Designed: The Adapter Framework. The PeopleSoft adapter basically communicates with the PeopleSoft Component Interfaces via the PeopleSoft JOLT protocol (over TCP/IP). The adapter communicates with PeopleSoft system by receiving a XML message which is later encapsulated into a SOAP request using the PeopleSoft psjoa classes. With this connection we can ...
In a previous posting, I discussed replacing the stock MVC serializer used for the JsonResult exposed when you use the controller method Json(..) instead of View. This was all find and dandy. But how – you may wonder – can I call actions that contain complex parameters? Do I need a special binder? Should I write my own? The answer is mostly "no". As Phil Hack blogged, the ASP.NET MVC framework already contains value providers that take care of that for you. All you need to do is ensure that your ...
Command passing is a handy way to execute pieces of code on specific threads. The idea is simple enough: Write a command into a buffer and that command then gets executed on some specific thread that monitors that command buffer. This paradigm is used in graphics APIs like DirectX and OpenGL, for instance. This allows you to split your data into working sets that are owned by a single thread and must maintain their state over a specified time period. In the graphics engine I’m developing at Raccoon ...
I’ve been seeing many members in the forums asking how to display a large copy of the image on mouseover. Some of them are displaying the image in a Repeater, GridView or DataList control. I didn’t find any direct solution that shows the scenario they wanted so I thought of writing this post to demonstrate how to go about it. I know there are lot of ways of doing/implementing a solution for this scenario and this is just one them. In this example I’m going to use the DataList control for displaying ...
This article is a Part 6 of the Interview Questions series. Part 1: BizTalk: Questions for interview without answers Part 2: BizTalk: Interview questions and principles Part 3: WCF: Questions for studying and interviewPart 4: WCF: Questions for studying and interview: DiscoveryPart 5: WCF: Questions for studying and interview: Routing Service Part 6: BizTalk: Advanced Questions Note: There is BizTalk Administrator interview questions by Tord Glad Nordahl. It is time for fun! These questions are for ...
While adding a new feature to the LINQ to Twitter Search API, I made significant changes to the Search entity that will break existing code. The new feature is support for Tweet Entities, a recent addition to Twitter’s Search API. I’ll cover Tweet Entities support after explaining what has changed. Motivation for Change When Twitter implemented Tweet Entities for their Search API, they only supported JSON format. LINQ to Twitter used ATOM for Search API queries; so, I didn’t have a choice on data ...
Axiom can be a little daunting when you first start working with it. This guide is designed to get you through the first initial hurdles and get you going on your first project using the library. A Brief History Axiom was started in 2003 by Chris McGurk ( leedgitar ) as a port from the popular OGRE project . Chris led the project until 2004, adding many features and providing a solid base from which to continue. I ( borrillis ) became the project lead in September of 2005 after a long pause in the ...
Scribe - Test Scribe is a documentation power tool designed to construct documents directly from TFS for test plan and test run artefacts for the purpose of discussion, reporting etc. Scribe only works with Microsoft Test Manager, so if you needed to generate documentation for TFS Builds, what options do you have? You could potentially modify the Build Process template to generate report documentation as the build is executed or you could use the TFS data warehouse to extract data to create rich ...
What a better way to start of the year, but with a product that I recommend. I reviewed this product last year on my personal site and now almost a full year later, I still recommend this product. I develop for different platforms and different languages so it is important for me to keep my snippets organized. Visual Studio and Eclipse both have a way to store snippets, but what if your put into a situation where you may need one and find that its in the other IDE that you are working with. That’s ...
I'm a big believer in the benefits of having automated tests live with your code. I'm not an aspirant to Red-Green-Refactor Nirvana, but I believe there is a huge value to be gained by taking the code from Button1_Click in the only Windows Form application you've ever written and placing it instead into a method that can be used by a unit test framework. Some of the benefits that I glean from this include my test being preserved past the initial implementation (when you write the next feature of ...
Wishing a very happy and blessed New Year to you in advance! A new release of Microsoft All-In-One Code Framework is available on December 29th. We expect that its 11 new code samples covering typical programming scenarios in Windows Phone 7, ASP.NET, WPF, Windows Shell, and WDK would ease your development in the coming New Year. You can download the code samples using Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, ...
Agile taught us to release early and release often, Agile also taught us to get the end user involved more frequently and directly. Goes without saying that release notes are an important part of any release. But what you don’t want to be doing is manually putting together the release notes with each frequent release you do. TFS lets you manage the application lifecycle with great ease & minimal administrative overhead, if your team is already checking in the code against work items and if you ...
Today's $10 Deal of the Day from APress at http://www.apress.com/97814... is Beginning Google Maps API 3"This book is about the next generation of the Google Maps API. It will provide the reader with the skills and knowledge necessary to incorporate Google Maps version 3 on web pages in both desktop and mobile browsers." ...
A co-worker was showing me an in phone scripting environment on the iPhone and I knew I had seen one mentioned for the Windows Phone before. TouchDevelop is an app from Microsoft Research that allows you to create small applications that do a wide variety of operations including using most of the capabilities of the device. So could this be a fun way for us geeks to waste some time while waiting for our oil to be change or a table to open up at your favorite restaurant? So what does this language ...
I was playing with the new Membership API (System.Web.Providers) for the upcoming Virtual TechDays While I was trying out a lot of options for using as DB store, one of the obvious choices was SQL Azure. With SQL Azure, I could offload the Database hosting capabilities to Azure and just focus on my application code. Of course, it comes at a cost and SQL Azure is a subscription based database available in different sizes and rates there of. One of the challenges I faced was, working with the Membership ...
Daytona - Iterative MapReduce on Windows Azure Overview MapReduce is a framework for processing highly distributable problems across huge datasets using a large number of compute nodes. It is a generic mechanism that comprises 2 steps: Map step: The master node takes the input, partitions it up into smaller sub-problems, and distributes them to worker nodes. The worker node processes the smaller problem, and passes the answer back to its master node. Reduce step: The master node then collects the ...
Overview C++ AMP is a GPGPU API – it allows you to define functions (kernels) that take some input, perform an expensive calculation on the GPU and return the output to CPU. GPU supports fast calculative operations across many SIMD-like cores - NVidia Tesla supports 512 cores compared to the paltry 10 cores available on the CPU today - even Intel's Knights Corner will only support 60 cores next year. Suitable only for certain classes of problems (i.e. data parallel algorithms) and not for others ...
So I was tasked with looking at converting 10 million tracks from mp3 320k to AAC and also Converting from mp3 320k to mp3 128k After a bit of hunting around the tool you need to use is FFMPEG Download x64 WindowsAlso for the best results get the Nero AACEncoder Download Now the command line STEP 1(From Flac)ffmpeg -i input.flac -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4aor (From mp3)ffmpeg -i input.mp3 -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4aNow the output.m4a ...
In this Issue: Colin Eberhardt, Lazar Nikolov, WindowsPhoneGeek, Jesse Liberty, Peter Kuhn, Derik Whittaker, Chris Koenig, and Jeff Blankenburg(-2-). Above the Fold: Silverlight: "Facebook Graph API and Silverlight Part 2 – Publishing data" Lazar Nikolov WP7: "Suppressing Zoom and Scroll interactions in the Windows Phone 7 WebBrowser Control" Colin Eberhardt Metro/WinRT/W8: "Tip/Trick when working with the Application Bar in WinRT/Metro (C#)" Derik Whittaker Shoutouts: Michael Palermo's latest Desert ...
Here are some of the best introductory HTML5 videos I have found online/for free. Mix 2011: HTML5 for Skeptics - Scott Stansfield channel9.msdn.com/Events/MI... Filling the HTML5 Gaps with Polyfills and Shims - Ray Bango channel9.msdn.com/Events/MI... 50 Performance Tricks to Make Your HTML5 Web Sites Faster - Jason Weber channel9.msdn.com/Events/MI... TechEd 2011 HTML5 and CSS3 Techniques You Can Use Today - Todd Anglin channel9.msdn.com/Events/Te... ...
This is the third of a three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework (EF) on top of an MS SQL Server database – a scenario that can be found very often. Please read the first part for a description of the sample application, a discussion of some general aspects of unit testing in a database context, and of some more specific aspects of the here discussed EF/MSSQL combination. Lately, I wondered how you ...
This is the second of a three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework (EF) on top of an MS SQL Server database – a scenario that can be found very often. Please read the first part for a description of the sample application, a discussion of some general aspects of unit testing in a database context, and of some more specific aspects of the here discussed EF/MSSQL combination. Lately, I wondered how ...
In this all-submittal post-"GoLive" 3 week marathon Issue: Vikas, Rene Schulte, Ollie Riches, Alex van Beek, Kevin Dockx, Michael Crump(-2-), Michael Washington, Antoni Dol, Colin Eberhardt(-2-, -3-), and Lazar Nikolov. Above the Fold: Silverlight: "Paging Data from the Server with Silverlight" Colin Eberhardt WP7: "Tessellating shapes on top of Bing Maps in a WP7 app" Ollie Riches LightSwitch: "Creating a Minimal LightSwitch Shell" Michael Washington Metro/WinRT: "Photoshop in METRO style" Antoni ...
The Azure Table service, provides a semi-structured storage in the form of tables that contain a collection of entities, these entities have primary keys and set of properties. A property is a name, typed-value pair. Every entity in table storage has two key properties, Partition Key and the Row key which together uniquely identify each entity in the table. The Table Service API is compliant with REST API provided by WCF Data Services. In order to use the WCF Data Services Client Library to access ...
· For the last decade, the majority of my dev work has leveraged the .NET Framework for construction of information systems. However, my interest has lain in numerical computing. · Is it possible to have an increasingly higher level of abstraction and at the same time achieve underlying high performance computing? The prevailing winds say no: C# is aimed at productivity, and C++ is for performance. Garbage collection was great, but do we still need it with the availability of smart pointers? Would ...
Introduction In case you missed it, I have a 10-part series on Silverlight 5 on SilverlightShow.net. In this extensive guide to Silverlight 5, I give a step-by-step introduction to Silverlight 5, and dives into the features most important to a Silverlight developer. You can check out the first 3 parts now and I will be adding a new one each week. The Roadmap for this Series I’ve included the Roadmap for the series below as you may want to visit other sections as you learn Silverlight 5. I picked ...
In this Issue: Michael Crump, Kevin Dockx, Ollie Riches, Shawn Wildermuth, Kunal Chowdhury, Beth Massi, Joost van Shaik, Colin Eberhardt, Tony Champion, David Catuhe, Igor, Jeremy Likness, and Dhananjay Kumar. Above the Fold: Silverlight: "SL5 PivotViewer Custom DetailPaneStyle" Tony Champion WP7: "Taking screenshots with Windows Phone 7 applications using a video feed" Joost van Schaik LightSwitch: "“I Command You!” - LightSwitch Screen Commands Tips & Tricks" Beth Massi Metro/WinRT/Windows8: ...
When using the storage client library to access Azure Storage, it is recommended that we make use of the Async calls to execute queries against the Azure Tables/Blobs. TableClient and BlobClient expose methods to execute queries asynchronously, for e.g. blobClient.BeginListContain... : which retrieves the list of Blob Containers in our storage. cloudTableClient.BeginListT... : which retrieves the list of tables in Azure strorage and many more Then there is CloudTableQuery class ...
UPDATE The below sample just showcases the locality sample. The complete set of attributes exposed which include PostalCode, CountryRegion, Address etc., are available at http://msdn.microsoft.com/e... This is the third in the series of posts I am doing on HTML5 for ASP.NET Developers Geolocation is one of the popular features of HTML5 that’s being touted as a favorite for building location aware applications. It helps to a great extent not just for Web Applications that run ...