Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
C

callingshotgun

@callingshotgun
About
Posts
5
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Linq Noob, stuck on type inference...
    C callingshotgun

    My mistake- I was using a "linq playground" project I'd initially created in VS2005. Moving to 2008 apparently didn't update all the references, so it was still trying to compile down to C# 2.0. Changed the LINQ references to point to 3.5 (instead of the preview release that you could download for 2.0), and changed the "target" to .NET framework 3.5, and it works perfectly now. Sorry for the confusion, and thanks for the help!

    C# csharp linq help ruby database

  • Linq Noob, stuck on type inference...
    C callingshotgun

    I'm still getting the "type arguments for method ... cannot be inferred from the usage" error. Even tried throwing gratuitious use of "Object" back in (Object x, Object y). Thanks for the attempt, though.

    C# csharp linq help ruby database

  • Linq Noob, stuck on type inference...
    C callingshotgun

    I'm trying to wrap my head around using LINQ and lambda expressions in c# 3.0, and as such I threw together a short (presumably) simple exercise- A general function that will take an IEnumerable and return a concatonation of the string representations of each of the elements contained therein. public String concat(ICollection values ) { return values.Cast().Aggregate((Object x, Object y) => x.ToString() + y.ToString()); } However, when I try to run this little gem, I get the following: "The type arguments for method 'System.Query.Sequence.Aggregate, System.Query.Func<t,t,t>)' cannot be inferred from the usage. Try specifying the type arguments explicitly" Googling revealed that this error is usually the result of saying (x,y) => ... instead of explicitly typing X and Y the way you would when defining the parameters in a method. Makes sense, except that I'm explicitly saying "(Object x, Object y)". Further, when I change all instances of "Object" to "String" (which I don't want to do for the final version, as I want this to work for any type of object), it works without a hitch. I don't understand why that makes a difference, since I'm calling ToString() on the object to get the string out, and "ToString()" works for any object. Is this a failing of the type inference system? Or am I just completely glossing over something? Much appreciated.

    C# csharp linq help ruby database

  • Nesting Invalid HTML in XML Docs
    C callingshotgun

    (Apparently Greener in XML than I thought... never used CDATA) Looked it up... Yeah, that's absolutely perfect, thanks! Damn you, online references, for making me feel leeter than I was! -Alex

    XML / XSL php question csharp html design

  • Nesting Invalid HTML in XML Docs
    C callingshotgun

    I'm attempting to put together an XML format for posting/migrating blog data, and while I'm in the design phase, I came across an interesting question. What's the best way to take HTML that may or may not be valid, and nest it in an XML document, while still keeping the XML valid? I'm trying to make it so that the data can be migrated between all manner of blogging apps (LJ, diaryland, self-hosted ones like Wordpress, Pivot, B2Evolution), and most of them have their own unique quirks that break valid XML (some, for instance, use

    instead of

    ) if just dropped in there. Is there some "comment" element, or other way of flagging chunks of data that shouldn't be explicitly validated? Should I just leave it up to the software processing the data to replace all "keyword" type characters (<> etc) with their HTML equivalents? < &rt; etc... The problem with this approach, is that there are a ton of these, and I don't want to place undo stress on those writing the software to deal with this format. Any ideas on valid ways to tell an XML parser "this is valid, just ignore it", or simpler ways to store unvalidated HTML in a valid XML doc, or in general just ideas as to what approach I should take? Oh, if you want to follow the progress of the format, http://www.callingshotgun.net/drupal Much appreciated. -Alex

    XML / XSL php question csharp html design
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups