Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

Duncan Mackenzie Duncanma "yeah that's awful close, but that's not why I'm so hard done by"
  • Syntax coloring, woohoo!

    Ion Todirel said:
    Duncanma said:
    *snip*
    damn, yes indeed I meant poll, sorry, it's not like you'll see a new poll on C9 every day you know, so it's not that hard to guess Smiley
    I just assumed it was related to syntax coloring... that combined with the typo left me confused.

    What was cooler about the old poll, if I may ask?

  • Syntax coloring, woohoo!

    Ion Todirel said:
    Duncanma said:
    *snip*
    looks cool Tongue Out and it also looks like the old pool is back, although not as cool as the old one Sad
    I have no idea what you mean by this:

    Ion Todirel said:
    old pool is back, although not as cool as the old one

  • Syntax coloring, woohoo!

    evildictaitor said:
    Charles said:
    *snip*
    
    
    
    class Program {
       void Main(){
    
        // is program pretty-colored, or is this just a straight tokeniser?
    
        Program p = new Program();
    
      }
    
    }
    
    
    
    


    Hmm. this means it won't color things properly like:

      Dictionary<String, ComplexNumber> d = null;
    

    It is a very simple code formatting system, I've also considered using http://www.actiprosoftware.com/Products/DotNet/ASPNET/CodeHighlighter/Default.aspx which I believe does a more complex style of formatting.

  • Syntax coloring, woohoo!

    Dodo said:
    Duncanma said:
    *snip*
    Can we get PHP? Smiley
    Just like C++, I'm happy to add it if someone wants to code up the formatter class. Feel free!

  • Syntax coloring, woohoo!

    Sven Groot said:
    Duncanma said:
    *snip*
    Too bad that doesn't support C++. Random cool C++snippet:

    template<int x, int y>
    struct gcd
    {
        static const int value = gcd<y, x % y>::value;
    };
    
    template<int x>
    struct gcd<x, 0>
    {
        static const int value = x;
    };
    I believe it could be extended to support C++ ... not sure I'll have the time, but if someone made a C++ formatter that works with the original source then I'd be happy to include it in our version.

  • Syntax coloring, woohoo!

    CannotResolveSymbol said:
    Duncanma said:
    *snip*
    public static void Main(String[] args) {
    ;)
    }

    doh! I'll take a look at that....

    Giving credit where credit's due: source code formatting code from http://www.manoli.net/csharpformat/

  • Reason for Colors

    TommyCarlier said:
    Duncanma said:
    *snip*

    while (true) ;
    While True Do End While

    You can do it like this: [ code language="vb" ] ... [ / code ]

    language options: CSHARP (C#), HTML, SQL, VB (for VB, VB.NET, etc...), JS (JavaScript), PSH  (Powershell)

  • Syntax coloring, woohoo!

    Duncanma said:
    Sven Groot said:
    *snip*
    strange...  I'll look into that, perhaps I've accidentally done the code *after* the smilely replacement... the smiley code is supposed to ignore anything within

    <pre> ... </pre>
    

    language options: CSHARP (C#), HTML, SQL, VB (for VB, VB.NET, etc...), JS (JavaScript), PSH  (Powershell)

  • Syntax coloring, woohoo!

    Sven Groot said:
    TommyCarlier said:
    *snip*
    Now it should just disable smilies inside those blocks.


    public void Foo()
    {
    // Let's see if contextual keywords work
    var x = from x in someThing
    where x < 10
    select x;
    }


    And they don't, as I expected. Smiley
    strange...  I'll look into that, perhaps I've accidentally done the code *after* the smilely replacement... the smiley code is supposed to ignore anything within

    <pre> ... </pre>
    

  • Reason for Colors

    jh71283 said:
    Duncanma said:
    *snip*
    Kewl..... when go live?
    bool isCodeFormattingLive = true;