tag:blogger.com,1999:blog-66926542024-02-08T12:23:18.514-05:00John Glisson's BlogAdventures in software development...and life...John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.comBlogger160125tag:blogger.com,1999:blog-6692654.post-90708767533653952472009-02-26T13:43:00.001-05:002009-02-26T13:43:22.314-05:00BLOG MOVED<div xmlns='http://www.w3.org/1999/xhtml'>I have moved my blog to <a href='http://jglisson73.wordpress.com/'>here</a>...<br/><br/>Bye bye Blogger!<br/></div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-78330240629639331702009-02-19T12:45:00.001-05:002009-02-19T12:45:13.549-05:00C# String.Format for Double/Decimal Values<div xmlns='http://www.w3.org/1999/xhtml'>The following examples show how to format float numbers to string in C#. You can use static method <a href='http://msdn2.microsoft.com/en-us/library/system.string.format.aspx' target='_blank'>String.Format</a> or instance methods <a href='http://msdn2.microsoft.com/en-us/library/kfsatb94.aspx' target='_blank'>double.ToString</a> and <a target='_blank' href='http://msdn2.microsoft.com/en-us/library/f71z6k0c.aspx'>float.ToString</a>.<br/>Digits after decimal point<br/><br/>This example formats double to string with <strong>fixed number of decimal places</strong>. For two decimal places use pattern "0.00". If a float number has less decimal places, the rest digits on the right will be zeroes. If it has more decimal places, the number will be rounded.<br/>[C#]<br/><br/>// just two decimal places<br/>String.Format("{0:0.00}", 123.4567); // "123.46"<br/>String.Format("{0:0.00}", 123.4); // "123.40"<br/>String.Format("{0:0.00}", 123.0); // "123.00<br/><br/>More examples are in <a href='http://www.csharp-examples.net/string-format-double/' target='_blank'>the original article here...</a><br/><br/><div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=17353511-0877-4c3e-b2d7-edb1a91aa576' class='zemanta-pixie-img'/></div></div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-89747044917816700332009-02-18T11:24:00.001-05:002009-02-18T11:24:37.349-05:00Architect Competencies<div xmlns='http://www.w3.org/1999/xhtml'>A couple of good articles were shared with me today about the competencies of a software architect and some training resources for them.<br/><br/><a href='http://www.microsoft.com/learning/mcp/architect/archcompetencies/default.mspx#EMG' target='_blank'>Microsoft Certified Architect Program Competencies</a><br/><a href='http://msdn.microsoft.com/en-us/architecture/cc511514.aspx' target='_blank'>Learn Architecture</a><br/><br/><div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=849a0729-c7d5-4ea6-9c20-51879d5a5641' class='zemanta-pixie-img'/></div></div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-70921861603252367102009-01-27T14:37:00.001-05:002009-01-27T14:45:22.640-05:00PowerShell Script for Find In Files<div xmlns='http://www.w3.org/1999/xhtml'>A co-worker gave me this Windows PowerShell script that I used to find files that contained a certain value...because the Windows Search Companion stinks!<br/><br/>gci -include *.txt *.* |? { $n = $_.FullName; $t = $false; gc $_ |% {$t = $t -or $_.Contains("stringtofind")}; if($t) {$n} }<br/><br/>Seems to do the trick!<br/><br/>Thanks Jason Turnage!!! :)<br/><br/></div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-82871796933406279952009-01-13T14:05:00.000-05:002009-01-13T14:07:16.725-05:00Failed to create a CLSID_BizTalkPropertyBagFactory<div xmlns='http://www.w3.org/1999/xhtml'>Was getting this message, "Failed to create a CLSID_BizTalkPropertyBagFactory" when trying to refresh the Group Overview screen in the BizTalk 2006 Administration Console.<br/><br/>What was the answer? Restart the Windows Management Instrumentation service.<br/><br/>Thanks to Michael Stephenson's blog for the answer...<br/><a href='%20http://geekswithblogs.net/michaelstephenson/archive/2007/09/01/115103.aspx' target='_blank'><br/>http://geekswithblogs.net/michaelstephenson/archive/2007/09/01/115103.aspx</a><br/><br/></div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-43755046453597146212008-08-06T13:55:00.000-05:002008-08-06T13:55:15.711-05:00Sharepoint Crashing My Browser<div xmlns='http://www.w3.org/1999/xhtml'>I was having a heck of a time with Sharepoint. Every time I would click on a document, my browser would crash. The only way I was able to get a document to open was to right-click on it and open it in a new window. Needless to say, this was really annoying!<br/><br/>I found a Microsoft KB article that solved the problem.<br/><br/><a href='http://support.microsoft.com/kb/929360' target='_blank'>http://support.microsoft.com/kb/929360</a><br/><br/>Just in case someone searches the interweb with the error code I was getting, it was: 0xc06d007f.<br/><br/>John<br/></div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com1tag:blogger.com,1999:blog-6692654.post-52814121521639631632008-07-03T15:00:00.001-05:002008-07-04T08:28:10.590-05:00ScribeFire - Worth It?<div xmlns='http://www.w3.org/1999/xhtml'>I'm taking a look at the <a href='http://www.scribefire.com' target='_blank'>ScribeFire</a> extension for FireFox to see how I like it. It would be nice to have a tool integrated with the browser to write blog posts quickly and easily.<br/><br/>The coolest feature is that I can drag-and-drop content from web pages into a blog post. That is pretty darn compelling.<br/> <br/>We will see how it goes!<br/><br/>John</div>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-83945370907553454852008-03-17T20:29:00.000-05:002008-03-17T20:29:23.856-05:00How to Install PaversWe have had a project lined up to extend the patio in our backyard. We were thinking of just having it done with concrete, which is what our existing patio is made of.<br /><br />After looking at different contractors for the job, it was way more expensive than we had hoped. Now, we are thinking of a do-it-yourself project using pavers. I installed a natural stone flower bed border around the front and side of our house and it turned out really well.<br /><br />This project would be a little more involved in some ways, but easier in others.<br /><br /><a href="http://www.wikihow.com/Install-Pavers">How to Install Pavers - wikiHow</a><br /><br />Maybe I'll get some before and after pictures out here. :)John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-48562668598719462082008-03-16T13:32:00.001-05:002008-03-16T13:54:50.971-05:00Nail PopsWe have a few places in our house where drywall nails are beginning to rear their ugly heads. I've never done this kind of work before, but it looks like it's a pretty easy fix.<br /><br /><a href="http://www.wikihow.com/Fix-Nail-Pops-in-Drywall">How to Fix Nail Pops in Drywall - wikiHow</a><br /><br />We also have one area where the drywall tape is beginning to separate from the wall. I may need to undertake that project too.<br /><br /><a href="http://www.wikihow.com/Repair-Drywall-Tape-That-Is-Separating-from-Your-Walls">How to Repair Drywall Tape That Is Separating from Your Walls - wikiHow</a><br /><br />I actually know a great guy who does small drywall repair. I just know I can save a good bit of money if I do it myself. The materials themselves are really cheap.John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-2303327412171730272007-12-06T10:11:00.000-05:002007-12-06T10:11:32.754-05:00Failed to create a CLSID_BizTalkPropertyBagFactory<a href="http://geekswithblogs.net/michaelstephenson/archive/2007/09/01/115103.aspx">Failed to create a CLSID_BizTalkPropertyBagFactory</a><br /><br />We periodically will start getting this exception in the BizTalk Admin Console and it's annoying to say the least. Previously, we would do a reboot not really knowing what was causing the problem. Well, the solution from this article worked for us. All we had to do was restart the Windows Management Instrumentation service and it started working again.<br /><br />Still not sure what creates this condition, but this fix is easier than taking a production server down to reboot!<br /><br />Yay!<br /><br />JohnJohn Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-58180087609614150422007-08-16T12:43:00.000-05:002007-08-16T12:43:40.083-05:00SQL Server. Create a data insert script from a table<a href="http://www.nigelrivett.net/SQLTsql/sp_CreateDataLoadScript.html">SQL Server. Create a data insert script from a table - Author Nigel Rivett</a><br /><br />This useful stored proc will generate insert statements for an entire table. Definitely a time saver!<br /><br />JohnJohn Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-56558712834176623202007-06-22T15:32:00.000-05:002007-06-22T15:32:32.716-05:00Dynamically Set BizTalk 2006 Pipeline Properties<a href="http://objectsharp.com/cs/blogs/matt/archive/2006/10/09/4099.aspx">Matt Meleski's .Net Blog - The ABC's of .NET : Dynamically Configuring Pipeline Component Properties in a BizTalk Orchestration</a><br /><br />I am so very glad that BTS 2006 is capable of this!<br /><br />Basically, you set properties on the message you are about to send through a pipeline and those properties will get set dynamically within the pipeline. This works both for stock and customer pipeline component properties.<br /><br />JohnJohn Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-61787993476533307072007-02-01T09:52:00.000-05:002007-02-01T09:57:19.791-05:00Calling A Receive Pipeline Inside an Orchestration in BizTalk 2006<a href="http://geekswithblogs.net/sthomas/archive/2005/06/16/44023.aspx">Calling A Receive Pipeline Inside an Orchestration in BizTalk 2006</a><br /><br />This is a quick example of how to call a receive pipeline from within a BizTalk 2006 orchestration.<br /><br />Here's the gist of it:<br /><br /><p class="MsoNormal" style="margin: 0in 0in 0pt;"><tt><span style="font-size: 10pt; color: black;">InputPipeline = </span></tt><tt><span style="font-size: 10pt; color: black;">Microsoft.XLANGs.Pipeline.</span></tt></p> <p class="MsoNormal" style="margin: 0in 0in 0pt;"><tt><span style="font-size: 10pt; color: black;">XLANGPipelineManager.ExecuteReceivePipeline</span></tt></p> <tt><span style="font-size: 10pt; color: black;">(typeof(CallReceivePipeline.ReceivePipeline),msgFullMessage);<br /><br /></span></tt><tt><span style="font-size: 10pt; color: black;">InputPipeline.MoveNext()<br /><br /></span></tt><tt><span style="font-size: 10pt; color: black;">msgSingle = new System.Xml.XmlDocument(); </span></tt><span style="font-size: 10pt; color: black; font-family: 'Courier New';"><br /><tt>InputPipeline.GetCurrent(msgSingle);</tt></span>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-48310222995635056932007-01-31T08:22:00.000-05:002007-02-01T09:53:13.455-05:00JkDefrag v3.6<a href="http://www.kessels.com/JkDefrag/">JkDefrag v3.6</a><br /><br />Here's a handy little defrag utility.John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-33457027067181892932007-01-23T10:44:00.000-05:002007-01-23T10:45:14.830-05:00BizTalk - Make the Port Operation Unique<a href="http://blogs.msdn.com/kevin_lam/archive/2004/08/20/217687.aspx">Kevin Lam's WebLog : An orchestration pattern that can hog the master message box CPU</a><br /><br />This is a compelling article on why the operation property of an orchestration port should be uniquely named.John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-22017366040800434522007-01-22T17:16:00.000-05:002007-01-22T17:20:41.462-05:00How to Debug a BizTalk Rules Policy in Code<a href="http://geekswithblogs.net/gwiele/archive/2004/10/05/12186.aspx">Rule engine - Another way to debug the rule engine</a><br /><br />I was experiencing an unreported error when I was trying to dynamically call a BizTalk 2006 rules policy in C# code. The policy ran and gave me no exception information and was annoying me to no end!<br /><br />It turns out the issue had to do with facts and namespaces. I didn't discover this, however, until I learned from the link above how to put a debug trace into the policy so it would tell me what was going on.<br /><br />Here's a snippet:<br /><br />TypedXmlDocument typedResult = new TypedXmlDocument("ValidationResult", validationResult);<br />TypedXmlDocument typedTransaction = new TypedXmlDocument("Transaction", transaction);<br /><br />System.Collections.ArrayList FactList = new System.Collections.ArrayList();<br />FactList.Add(typedResult);<br />FactList.Add(typedTransaction);<br /><br />DebugTrackingInterceptor debug = new DebugTrackingInterceptor(@"D:\trace.txt");<br />Policy rulePolicy = new Policy("ValidateTransaction");<br />rulePolicy.Execute(FactList.ToArray()); <br />rulePolicy.Dispose();John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-48675052457412808642007-01-17T11:17:00.000-05:002007-01-17T11:36:00.555-05:00Passing an Array of Facts into the Rules Engine<a href="http://datacogs.com/datablogs/archive/2005/02/03/227.aspx">Passing an Array of Facts into the Rules Engine (BizTalk 2004)</a><br /><br />The last piece of the puzzle for me in working with generic messages to do away with a TON of duplication is to dynamically call a rules policy to validate outbound EDI messages.<br /><br />This is some sample code I found on the blog mentioned above:<br /><br /><p>//System.Collections.ArrayList List;<br />sCon = "Initial Catalog=Northwind;Data Source=(local);Integrated Security=SSPI;";<br />con = new System.Data.SqlClient.SqlConnection(sCon);<br />dcNorthwind = new Microsoft.RuleEngine.DataConnection("Northwind", "ShipperCountry", con);<br />List.Add(dcNorthwind);</p><p><br /></p> <p>xmlDocument = msgShippingRequest;<br />typedXmlDocument = new Microsoft.RuleEngine.TypedXmlDocument("RoleLinkSample.ShippingRequest",xmlDocument);<br />policy = new Microsoft.RuleEngine.Policy("ShippingPolicy");<br />List.Add(typedXmlDocument);</p><p><br /></p> <p>policy.Execute(List.ToArray());<br />msgOutgoingShippingRequest = typedXmlDocument.Document;<br />policy.Dispose();<br />typedXmlDocument = null;<br />dcNorthwind = null;</p><p><br /></p>This sample is based on Biztalk 2004, but should not differ in this instance for Biztalk 2006.John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-13796222775780290762007-01-16T16:24:00.000-05:002007-02-01T10:04:59.024-05:00Dynamic Mapping (Transforms) in Biztalk Orchestrations<a href="http://www.topxml.com/XmlDocument/re-13950_Dynamic-Mapping-Transforms-in-Biztalk-Orchestrations.aspx">TopXML : Dynamic Mapping (Transforms) in Biztalk Orchestrations, in XmlDocument</a><br /><br />This is how we call maps dynamically in Biztalk 2006.<br /><br /><p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;">tMapType = System.Type.GetType("DynamicMaps.Map_A, DynamicMaps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=faed587cb93de4ea");<o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style=""><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;">construct Out_Xml<o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;">{<o:p></o:p></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt;"><span style=""> </span>transform (Out_Xml) = tMapType(In_Xml);<o:p></o:p></span></p> <span style="font-size: 10pt;">}</span>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-7953960499517004502007-01-16T07:18:00.000-05:002007-02-01T10:11:40.915-05:00BizTalk Correlation of Untyped Messages<a href="http://blogs.msdn.com/richardbpi/archive/2006/05/01/587550.aspx">Richard Seroter - SoCal BizTalk Musings : BizTalk Correlation of Untyped Messages</a><br /><br />This is VERY cool...<br /><br />I had two choices: created fifty separate orchestrations to handle all of the types and scenarios I needed to cover, or find a way to correlate untyped (XmlDocument) messages. I searched for the latter and found this article.<br /><br /><span style="font-family: arial; font-size: 10pt;"> public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)<br />{<br />string trackCode = Convert.ToString(System.Guid.NewGuid());<br />inmsg.Context.Promote("TrackingID", "http://Microsoft.Demo.Customer.CustomerPropertySchema", trackCode);<br />return inmsg;<br />}<br /><br /></span>Sweet!John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-28030042747678683422007-01-10T21:23:00.000-05:002007-01-10T21:24:51.686-05:00MSDN TV: Introduction to Analysis Services 2005I watched this demo and it is really impressive how quicky analysis cubes can be created and consumed in SQL Server 2005. I haven't had the opportunity to use analysis services with SQL Server 2000, so I can't appreciate how much easier it is in 2005. However, the benefits of cubed data become apparent pretty quickly while watching this short demo.<br /><br /><a href="http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050714SQLServerAN/manifest.xml">MSDN TV: Introduction to Analysis Services 2005</a>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-56578601910970605432007-01-10T21:22:00.001-05:002007-01-10T21:22:58.337-05:00SQL Server Query Performance TuningThis article on SQL Server Query performance tuning appears to be very useful. Something to have in the toolbox.<br /><br /><a href="http://www.sql-server-performance.com/statistics_io_time.asp">http://www.sql-server-performance.com/statistics_io_time.asp</a>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-33653839941090393372007-01-10T21:21:00.000-05:002007-01-10T21:22:12.156-05:00Create Data Insert ScriptsThis link is to a stored proc that will create Insert scripts for all of the data in a sql server table. A useful little bugger...<br /><br /><a href="http://vyaskn.tripod.com/code/generate_inserts.txt">http://vyaskn.tripod.com/code/generate_inserts.txt</a>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-3478412475107179622007-01-10T21:14:00.000-05:002007-01-10T21:16:02.697-05:00How to remove xmlns attributes<a href="http://www.xslt.com/html/xsl-list/2004-12/msg00550.html">How to remove xmlns attributes in html out put via copy-of</a><br /><br />Yippie friggin doo da! I found this xsl script that strips namespaces and prefixes out of an xml document. This is going to be very useful in some Biztalk 2004 transformations that I doing.<br /><br />This is what I ended up with:<br /><br /><?xml version="1.0" encoding="UTF-8" ?><br /><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><br /><xsl:template match="*"><br /><!-- remove element prefix (if any) --><br /><xsl:element name="{local-name()}"><br /><!-- process attributes --><br /><xsl:for-each select="@*"><br /><!-- remove attribute prefix (if any) --><br /><xsl:attribute name="{local-name()}"><br /><xsl:value-of select="." /><br /></xsl:attribute><br /></xsl:for-each><br /><xsl:apply-templates /><br /></xsl:element><br /></xsl:template><br /></xsl:stylesheet>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-54316992319926833662007-01-10T21:06:00.001-05:002007-01-10T21:06:31.736-05:00BizTalk Server 2006 Business Rules and Static MethodsThis is an INCREDIBLY useful trick to test your Biztalk Business Rules Engine policies. Definitely a must have for BRE development.<br /><br /><a href="http://blogs.msdn.com/richardbpi/archive/2005/11/14/492489.aspx">http://blogs.msdn.com/richardbpi/archive/2005/11/14/492489.aspx</a>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0tag:blogger.com,1999:blog-6692654.post-58593876609070452572007-01-10T21:04:00.000-05:002007-01-10T21:05:35.627-05:00Windows Group and User Accounts in BizTalk Server 2006Users and Groups to setup for BTS 2006 install.<br /><br /><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bts06securityprotect/html/a01603bd-4105-4691-819d-de43b00b40f3.asp">Windows Group and User Accounts in BizTalk Server 2006</a>John Glissonhttp://www.blogger.com/profile/04304626204808809621noreply@blogger.com0