.net
-
c# .net split strings with math divrem using lambda linq
Recently I came across a nice alternative to loops using linq for evenly splitting a string using Math.DivRem. The following example illustrates how this can be used to parse a sequence of numbers based on a time series which may… Continue reading
-
lastChild is null in FireFox works in IE invalid nodeType javascript c# asp .net
This issue alluded me at first as it works in IE but not in FF. See code below. In you’re interested in reviewing other approaches to styling your table cells, see my similar article here. Continue reading
-
system.windows.resourcedictionary. source threw an exception wpf c#
In general this issue is caused when a referenced resource cannot be found. In my specific circumstance, as the xaml above details, this issue was caused by a reference to PresentationFramework.Aero DLL that was not contained in the output bin… Continue reading
-
pass null to sql data source select
References http://forums.asp.net/t/963932.aspx Continue reading
-
.NET Map Drive in C# (WPF)
Complete class reference updated for WPF (not yet tested). For backwards compatibility, previous Win32 code maintained in code comments (and just replace ‘Window’ with ‘Form’). References StackOverflow (blog), http://stackoverflow.com/questions/3465182/how-to-map-a-drive-using-c PINVOKE (code references and snippets), http://pinvoke.net/default.aspx/Structures/NETRESOURCE.html MSDN (info on class types… Continue reading
-
Common WPF Resource Dictionaries
Skinning a WPF application is as simple as adding an assembly reference (PresentationFramework.Aero) and xml config change. See below. Other sources: References StackOverflow, http://stackoverflow.com/questions/2075720/windows-7-theme-for-wpf Continue reading
-
Serialize C# object to JSON JavaScriptSerializer .Net
References MS Blogs, http://blogs.microsoft.co.il/blogs/pini_dayan/archive/2009/03/12/convert-objects-to-json-in-c-using-javascriptserializer.aspx JSON.org, http://www.json.org/js.html C# Cross-Site Page Access, http://stackoverflow.com/questions/6290053/setting-access-control-allow-origin-in-asp-net-mvc-simplest-possible-method PHP Cross-Site Page Access, http://rayfd.wordpress.com/2007/03/28/why-wont-eval-eval-my-json-or-json-object-object-literal/ JS Eval string to JSON Object, http://rayfd.wordpress.com/2007/03/28/why-wont-eval-eval-my-json-or-json-object-object-literal/ Continue reading
-
WCF Service Library in Windows Service
References CodeProject (WCF Service in Windows Service), http://www.codeproject.com/KB/WCF/WCF_windows_hosting.aspx MSDN (Debug Windows Service Applications), http://msdn.microsoft.com/en-us/library/7a50syb3(v=vs.80).aspx MSDN (Host WCF Service in Managed Windows Service), http://msdn.microsoft.com/en-us/library/ms733069.aspx Continue reading