Tag | XML Posts

I'm a big fan of automated testing which actually proves something. Unit tests may prove all the components in a solution work independently, but that doesn't mean you have a working solution. Integration tests give you confidence in the whole solution, but the cost of having a test suite with a lot of external dependencies is the risk of false build failures and long-running test suites. To get something in between, we have acceptance tests written in SpecFlow which run tests at the highest layer ...
Goal: Find the business days; i.e. exclude weekends How to: Here is some code to get the first business day after or before the weekend. It is surprisingly simple but thought the code may help save folks some time. Just a note that there is no built-in .Net feature to give you public US or other holiday calendar dates, you need to build your own using a table to keep track of public holidays in most situations. Simple enough to do, extend the methods below to query a database or xml or JSON, etc, ...
Recently I was copying a composite property which I will just have to refer to as Team. (This was on client's code so I have to change all the names) In class A, Team looked like: return this.Tom + "-" + this.Dick + "-" + this.Harry; In class B, Tom, Dick and Harry were called UncleTom, UncleDick and UncleHarry. When I copied the composite property from class A to class B, highlighted Tom in this.Tom and pressed control-J, ReSharper went straight to this.UncleTom - "clever" ReSharper! Really I should ...
The new Service Release 2 of SharpBox 1.1 comes with support for many new storage providers, e.g. Strato HiDrive, CloudMe or FTP. In addition to that we are also proud to offer our library with SR2 via NuGet which allows to integrate the binaries and all dependencies in a new project very fast. Please use this URL to visit our NuGet gallery page: http://nuget.org/List/Packa... The following list will give you a brief overview about the changes in this service release: ...
This example is not covered in the ESB Toolkit samples and I bumped my forehead a few times while making it work. I thought it’d be helpful to save other fellow BizTalk'ers from headaches by publishing findings. I have been fun of dynamic generic messaging for quite a while and went long ways to avoid working with typed messages and static bindings when it made sense. Nowadays, with the ESB Toolkit one does not have to spend much effort to achieve this goal. But one has to learn intricacies of configuration ...
In this Issue: Michael Washington, Kunal Chowdhury, WindowsPhoneGeek, Xianzhong Zhu, Jeremy Likness, Pete Brown, Jesse Liberty, Derik Whittaker, Morten Nielsen(-2-), Sumit Dutta, Asim Sajjad, and Dhananjay Kumar. Above the Fold: Silverlight: "Enumerating MIDI Interfaces using Silverlight 5 PInvoke" Pete Brown WP7: "Migrating PushBox Game from Android to Windows Phone 7 - Part 5" Xianzhong Zhu Windows8: "Windows 8: What you Need to Know" Jeremy Likness LightSwitch: "How To Create a LightSwitch Command ...
Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans... ...
So someone moved your Silverlight cheese? Go and get some HTML5 cheese! Before WPF/E & Avalon were anything more than vapourware, W3C had the SVG standard(Scallable Vector Graphics) for 2D vector graphics over the web. Using Javascript, you could manipulate 2D animations & tranforms. You can embed SVG in HTML5 today. Yeah, its like going back to Silverlight 1.0, but you just have to deal with it! Embrace change. SVG Features · Designed for 2D graphics - display vector graphics & text ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for September 12 - 18, 2011. Here are the top 5 news on SilverlightShow for last week: Build 2011: What Is WinRT, and Is Silverlight Dead? Top 10 Moments from BUILD Day 1 Keynote and what wasn't said If Silverlight is Dead... Doug Seven's thoughts on the future of existing Microsoft technologies WinRT vs. Silverlight - Part 1 - XML Namespace Visit and bookmark SilverlightShow. Stay in the 'Light ...
Here is a small snippet of BizTalk Server wisdom which I will post for posterity. Say you are creating a custom pipeline component with custom properties. You create private fields and a public properties and write all the code to load and save corresponding property bag values from and too your properties. At some point, when you deploy the BizTalk application and test it, you get an exception from within your pipeline stating, unhelpfully, that "Value does not fall within the expected range." Or ...
(Warning: This is semi-advanced stuff. It’s not hard, per se, but it involves editing important project files manually, which, if done wrong, can render them useless making it so that your code won’t compile (and may not even load into Visual Studio). So back up everything or (better still) commit it to your source control repository before doing anything so that in case you mess something up, you can easily recover! You have been warned.) I’ve been steadily becoming more familiar with MSBuild over ...
At http://99-bottles-of-beer.n... an old drinking song that printed out by an award-winning piece of code obfuscation cited in a Wikipedia article at http://en.wikipedia.org/wik... inspired a comparison of programs written in various languages to print this song. The Cobol (and to a lesser extent C#) programs were easy to understand whereas other languages such as J*** were not. There was even a highly obfuscated one in JavaScript! At http://blogs.msdn.com/b/alf... ...
At http://csharperimage.jeremy... there is an interesting discussion on whether to use Prperties or to publicly expose fields. Whilst I will admit there be cases where every last CPU cycle must be conserved, I conclude that StyleCop's instruction to use Properties rather than publicly expose field must normally be followed. What do you think? Can't code withoutAdvanced XML support inMicrosoft Visual Studio XML editor ...
Rich internet applications are growing fast in the business and enterprise application landscape as more and more software managers and corporate decision makers are electing to place rich internet applications (RIA's) into their organizations. But with the many advantages of rich internet applications over the client/server deployments, organizations also find many new aspects they need to master and overcome - one of them is understanding the new security vulnerabilities of the rich web based applications ...
In my previous post I have shown how we can use a C# function in the XSLT. Now I want to go one step further and use in the transformation the ASP.NET controls along with their events. Let's start from the sample xml data: <files> <file Id="F58C2962-AC0D-4C55-80A8... Name="file 1" Path="D:\Temp\" Extension="iso"/> <file Id="FDC1358E-D9C8-4A70-ABE0... Name="file 2" Path="D:\Temp\" Extension="jpg"/> </files> I want to create a table from it and for each ...
Here is the screenshot of final output. Here is what PoC is doing 1. There is Silverlight application hosted in CRM on custom area-subarea. This in-turn needs two web resources 2. There is Custom button added in Ribbon 3. Third web resource is hosting JavaScript function 4. On click of Custom Button on CRM Ribbon function in JavaScript web resource is called which in-turn calls the method in C# code of Silverlight application. String input is passed to this method 5. C# method is converting the input ...
Using Xslt along with XPath we can transform any xml document in the way we want and use it e.g. to create the html page. At this time, we have Xslt 2.0 and XPath 2, but unfortunatelly .Net Framework doesn't support them. We can only use Xslt 1. We have two ways to work with Xslt 2. One is to use a 3rd party library, e.g. XQSharp or Saxon. The second option is to manually implement the missed in Xslt 1 functions. How to do it I want to show in this post. First is the sample code. The goal is to create ...
I just wanted to return from sql server data as xml. This is very easy to do, because sql server has a build-in suppot for that. select Id, Name from Extensions FOR XML RAW('Extension'), ROOT('Extensions') But using this query, the returned column has name like XML_F52E2B61-18A1-11d1-B105... It's been some time when I manually created a sql query, so I lost few minutes to think, how to alias this column using the AS keyword. Correct query looks as follows select (select Id,Name from Extensions ...
In my previous posts I have shown how to get xml data from database and deserialize it. But sometimes we want to work with the xml and do some operations on it. To working with xml, in the .net framework there are two tools for it. One is to use the XmlDocument class and second is the linq to xml with the XDocument class. I personally prefer to work with linq to xml, so I must convert the XmlDocument object to XDocument which I have after I took the xml from database. To convert the XmlDocument to ...
In one of my previous posts I have used my custom code to serialize and deserialized data to/from XmlDocument class. Examples of use: XmlDocument extensions=//some xml document taken from db List<FileExtension> result = SerializationUtils.DeSerial... List<FileExtension> extensions=//some new objects to save to database XmlDocument serializedExtensions = SerializationUtils.Serializ... ...
I have a simple database table with only id and one xml column as shown below. In this column I have a list of available extensions saved as xml. public class FileExtensionsList { public FileExtensionsList() { Id = Guid.NewGuid(); } public virtual Guid Id { set; get; } public virtual XmlDocument Extensions { set; get; } } This xml I'm not creating manually. I have a custom entity which I serialize to xml: [XmlRoot("FileExtensionsLis... [Serializable] public class FileExtension { [XmlAttribute] public ...
At http://computer-forensics.s... there is a free specialised tool for imaging suspect PCs and exmining the image running under VMWare. Proud user ofAdvanced XML support inMicrosoft Visual Studio XML editor ...
If you've found this blog posting, you've probably been banging your head against a wall trying to get those errors generated from your web service to appear in your MVC web site. You may have already discovered that while you can see the messages display in Fiddler, getting them to appear in your project takes a little bit of work. First, l strongly recommend you check out the work already done on this subject by more dedicated bloggers than l: http://kenneththorman.blogs... ...
I’m a big fan of client-side development using HTML / CSS / JavaScript for about the past 2 or 3 years – really ever since I dug into jQuery and really began to appreciate the power that the technologies on the client-side possess. Nowadays, everything is HTML / CSS / JavaScript – it’s in all the articles, all the techies are talking about it, and it’s on everyones’ resumes. In looking at candidate resumes or listening to presenters speak about web technologies, we constantly hear “HTML / CSS / JavaScript”. ...
Occasionally I write a rant or two and this one has been boiling for ages. First off you need to read Mike Watson’s Blog Post on Silverlight Ambiguity in Office 365: http://jmikewatson.wordpres... So now let’s get started. First off this post has been boiling since I have heard the question in one of my sessions last year “What do you think will happen to Silverlight now that HTML 5 exists?”. I brushed it aside. I ignored it when ...
A recent picture taken by the MESSENGER spacecraft in orbit around Mercury, shows a smile! The "smiling crater" can be seen at http://messenger.jhuapl.edu... The Dawn spacecraft is now in orbit around the minor planet Vesta. NASA's web site for Dawn is at http://dawn.jpl.nasa.gov/ There is a video of Vesta rotating at http://www.youtube.com/watc... And where is New Horizons, NASA's Pluto-Kuiper Belt mission? It is now 20.68 AU from the Sun ...
Technorati Tags: Scala,C# to Scala Introduction This post gives an overview of Scala from a C# developer’s perspective in light of efforts for a current .Net port coming closer to fruition. By closer I mean they have the compiler done but not the Visual Studio or SharpDevelop plug-in. From what I could find there is also no CLR based REPL available. You are also unable to call CLR code with generic signatures. While all of these issues are being worked on, to have a play I suggest using the JVM implementation ...
Article Source: http://geekswithblogs.net/c... What is the best approach for developing a WCF client application that sends messages to the WCF on-ramps exposed by the BizTalk ESB Toolkit? I had considered various approaches: Generate an xml message from a string template using string replacements. Then submit the message to the ESB endpoint using code similar to the Itinerary Test Client provided with the ESB Toolkit. Then for the response use XPath to get the required data. - This is obviously ...
Say you've got an app that has multiple activities, and you want each activity to use the same options menu (the menu that appears when the user taps the MENU button). Rather than repeating the Inflater and ItemSelected code on each activity, just create a new activity class and have all your other activities extend it rather than Activity. To start, create an xml layout for your menu (in the res/menu directory): <menu xmlns:android="http://schem... <item android:id="@+id/new" ...
Giovanni Bassi published the original NuGet package for LINQ to Twitter (L2T), which I'm appreciative of. Since then, I have yet to do a release myself, but that is changing now. The current version of LINQ to Twitter is stable enough for a release, so the time is right. I think there are a few aspects of a LINQ to Twitter NuGet package that aren't as simple as point at a project and your done, so I'll document my process here in case anyone else is interested. Getting Started I had played around ...
LMAX provides a .NET API for automating your financial trading strategy. sign up & download here:http://www.lmaxtrader.... If you can combine software engineering skills + numerical analysis skills + an understanding of financial markets --> the whole is greater than the sum of the parts. You can build products that make money, and you can save money by being a cross-domain expert. http://en.wikipedia.org/wik... - see here to learn more about this lucrative field. A good ...
Binding file for WCF Adapter doesn't save the password no matter it is generated by "Add Generated Items..." wizard in Visual Studio or "Export Bindings..." in administration console. It is by design dut to the consideration of security, but it is very annoying especially when you import bindings which contain multiple WCF send ports. The way to aviod retyping password everytime after an import is to edit the binding file before import. Here is what needs to be done. 1. Find the following string: ...
I have had the chance to talk at many conferences these past few years, and came up with a way to prepare them which works really well for me. Most importantly, it would make it quite easy to overcome an emergency (for example if my laptop would suddenly lose data). The whole code as well as the slides and other documents are in the cloud. I also use source control for my demos, so that I always have the latest and the greatest, but also a history of changes I made to my demos. Finally I have a system ...
Hopefully nothing. But if you have to do more than simple XCopy deployment and you need to support updates, upgrades and perhaps side by side scenarios there is no way around MSI. You can create Msi files with a Visual Studio Setup project which is severely limited or you can use the Windows Installer Toolset. I cannot talk about WIX with my German colleagues because WIX has a very special meaning. It is funny to always use the long name when I talk about deployment possibilities. Alternatively you ...
These days I'm working on a CMS solution and I had all my list definitions and list instances in one feature, so everything was working fine. But its not ideal as each time I change the list definitions I have to de-activate and re-activate the whole feature. And each time I do that the default data I have defined in list definitions are duplicated. So I created another feature for list instances but its giving the following error when trying to activate. "GetUserListSchema(): Failed to get the list ...
If you're like me, you've probably clicked/clacked, docked/undocked the window with the edmx file while you were working on it in visual studio without intending to--and now, the entity diagram is gone and you are unable to open the file again from the solution window! Luckily, the edmx file is just another visually displayed xml file. From the solution window, right click on the edmx file -- select "Open with..." -- choose Xml . Once you see the xml for the edmx file close it. Go back to the solution ...
I just have to write about design data because it makes my life so much easier. More than I could imaging before I started to use it. There are two ways for creating design data; Either you let Expression Blend do it for you or you just write your own in visual studio. Basically it is a xml file representing your model. Creating The fast way: - Right click a view (or any xaml-file) in your project and choose "Open in Expresion Blend" - Click here: - Choose "Create sample data from class" and then ...
I wanted to get familiar with SharePoint 2010 because I have noticed how the market is starting to demand it. Also, most of the SharePoint 2010 guides on the net are outdated. They show everything from registry hacks/editing xml files to installing hot fixes/service packs. My guide uses the latest bits as of 6/7/11 to create a SharePoint 2010 server inside of an Virtual Machine. This will be more than enough to begin creating Silverlight Web Parts inside of SharePoint 2010. NOTE: I did not want to ...
Workflow 4 State Machine – Distributed Tracking Visualization · Disclaimer: This post requires an understanding of WF 4.0.1 , WCF and WPF. · Before I explain the how, look at the following image for the what: I am debugging a REMOTE workflow STATEMACHINE instance, and from tracking information sent from server, I am able to highlight the current state in my client! Visual Workflow Tracking Sample – a Big Ball of Mud · Workflow 4 provides the System.Activities.Presentat... class which ...
In a previous post, I talked about how to build your own custom Media Type Formatter with the WCF Web API. In this post, I used HAL as the media type to expose an API for Nerd Dinner. There are a core set of guiding principles to building RESTful services and one of those principles is that documentation efforts for a service should be focused on defining the media type(s) and link relations that the service uses. While it’s important to have a consistent pattern for URI design, it’s really not that ...
Media Type Formatters in the WCF Web API provide a way for the consumer of your service to not only specify the format they want for their response, but also specify the format they are using on their request. Typically the desired response format is specified in the “Accept” request header and the request body format is specified in the “Content-Type” request header. Media types are central to building any RESTful service. Two of the most common media types are “application/xml” and “application/json”. ...
LDAP is not Active Directory, though Active Directory is LDAP. As someone who drinks the Microsoft Kool-Aid, I found myself using LDAP for something other than Active Directory and I thought I should share what I have found. The problem domain was to connect a new MVC application to an existing Sun One LDAP Store. First off, authenticating an MVC application using forms mode authentication and the Membership providers is straight forward. Start with the ASP.NET MVC 2 Web Application Template that ...
We’ve used HtmlAgilityPack based function IsValidHtmlFragment(string html) to validate dynamically loaded Html Fragments before inserting into main page(or do not insert if it is invalid) and recently noticed that it doesn’t return false for some fragments with not closed tags. I decided to find some other tool to call from the code and found that most of HTML parcers are too forgivven(like browsers) or too strict- to check full XHTML conformance. I am going to add manual procedure to run Tidy.EXE ...
There are a number of other file formats that achieve similar things as PDF. Below I have listed some of them and try to explain the differences or similarities of these alternatives. These are the comparisons that are made: PDF versus XPS XPS is as yet the most serious alternative to PDF that has come to market. You can find more information about XPS here. That page also contains a comparison between both file formats. PDF versus PostScript PDF was developed by Adobe, the company that also created ...
In this Issue: Kunal Chowdhury, Roy Dallal, Jim Wightman, Kevin Hoffman, Levente Mihály, Peter Kuhn(-2-, -3-), René Schulte, WindowsPhoneGeek, Jesse Liberty(-2-), John Papa. Above the Fold: Silverlight: "Reactive Extensions–FromAsync" Jesse Liberty WP7: "Windows Phone 7 Mango - Sockets" Peter Kuhn Shoutouts: Kunal Chowdhury has a list up of all the Windows Phone 7.1 (Mango) Features From SilverlightCream.com: Windows Phone 7 Jump Start with Mango - 1 - Creating a Hello World Application Kunal Chowdhury ...
At a client I work at, we have a few dozen WCF services used throughout the environment. It's become difficult to consolidate the various services so that people know when knew ones become available and to administer their connections as environments change. To address this, we created one web project that has connection information for every service. Each service has a different factory method depending on Binding and Endpoint credentials. The bindings and endpoints are generated programmatically, ...
Two posts in two days, this posting rate will never last! Anyway. On my current project I needed to implement a web service in C#. Because of its uniform interface, stateless nature and generally being seen as the way web services are now done I decided to implement the web service as a RESTful one. This would be my first ever web service. Once that decision was made the next one was how best to go about implementing a RESTful web service. Having done some research and after looking into WCF I decided ...
I have recently been exploring the wonders of PowerShell. I also recently worked through some deployment / configuration issues and thought I would bring my newly acquired appreciation of PowerShell to the mix. I had never given PowerShell a second thought. I really had no idea what it was or how it was used. This is very surprising given my perl background. Once I gave it a chance, I loved it. One of the most exciting things about PowerShell is that unlike with regular scripting languages, you are ...
I have been using Rhino Mocks for a about 6 months now, and until recently I hadn't a need to mock a method which had any out parameters. This is mainly because I have a dislike using out parameters and try to avoid using them where possible, but that discussion is possibly for another blog entry. Anyway thankfully Rhino Mocks makes mocking methods with out parameters very simple. My requirement were I needed to pass in xml and get some X and Y coordinates back, my method signature is: void GetCoordiates(string ...
Granted, if you are just transforming data in the same SQL server, why would you do it in SSIS instead of just using Pivot and Unpivot in T-SQL query? But what about in the case where data comes from various sources? What I had fun doing was the ability to skip using Linked server, pull in data from different sources, like XML over web service. Another point that made me happy was the ability to simulate ROW_NUMBER() function with the merged data by using a Script Component. Anyway, I highly recommend ...