Windows Live Writer is expected to help me write source code examples easily and post them to my blog seamlessly. In this post I am trying to test its functions.
Here is some C++ code:
1: class A
2: {3: public:4: A();5: ~A();6: void f();7: };8:9: // an example of implementation inheritance10: class B : private A11: {12: public:13: B();14: ~B();15: void g();16: };17:18:
Following is some Python code:
1: import os2: import sys3:4: def main():5: filepath = sys.argv[1]6: contents = open(filepath).readlines()7: print 'Number of lines: ' , len(contents)8:9: if __name__ == '__main__':10: main()
A Haskell code example:
1: double:: Integer -> Integer2: double x = x + x3:4: square :: Integer -> Integer5: square x = x * x6:7: main = do8: print $ square 109: print $ double 2010:11:
Some JavaScript:
1: fucntion f()2: {3: alert('Hello World');4: }5:
Some HTML:
1: <html>2: <head>3: <title>Hello World </title>4: </head>5: <body>6: <p> Don't Panic </p>7: </body>8: </html>9:
Some CSS:
1: .header2: {3: forground-color: black;4: background-color: red;5: text-size: 20;6: }7:
I guess this is more than enough for me. I am happy it works nicely.
No comments:
Post a Comment