Tuesday, December 29, 2009

Windows Web Services API (WWS API)

http://weblogs.asp.net/kennykerr/archive/2009/11/05/windows-web-services-versus-atl-soap.aspx


Wednesday, September 23, 2009

Inheritance case study #2: Implementing interface inside a base class

class D1 {
public:
virtual void Test(int a) = 0;
};

class D4 {
public:
void Test(int d){

}
};

class D5 : public D1, public D4 {
public:
};

Inheritance case study #1: Inheriting an identical interface from two different classes

class D1 {
public:
virtual void Test(int a) = 0;
};

class D2 {
public:
virtual void Test(int b) = 0;
};

class D3 : public D1, public D2 {
public:
void Test(int c){

}
};

Tuesday, August 4, 2009

simple bash

A good and compact Bash reference

Another good introduction. More complete.

A Very Simple example:


#!/bin/bash

i=0
while [ $i -lt 400 ]; do
printf "%i : %b\n" "$i" "\0$i"
let "i++"
done


Getting the script path


SCRIPT_PATH="${BASH_SOURCE[0]}";
if([ -h "${SCRIPT_PATH}" ]) then
while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
fi
pushd . > /dev/null
cd `dirname ${SCRIPT_PATH}` > /dev/null
SCRIPT_PATH=`pwd`;
popd > /dev/null

Sunday, February 22, 2009

Visual C++ 2010 and Parallel Patterns Library

Found an introduction article for Visual C++ 2010

http://msdn.microsoft.com/en-us/magazine/dd434652.aspx

1. Inclusion of TR1 to C++ Standard Library, including the support of function objects through the use of "bind"

2. Suppport for "auto" keyword, to avoid explicitly defining the type of variable (because the type is either very hard to define or complicated to express)

3. Support for lambda expressions to define unnamed function objects (also called "closures")

Example: auto f = [](int x, int y) { return x + y; };

Saturday, February 21, 2009

Programming Paradigms

1. Imperative/Procedural/Algorithmic
- "Verb" oriented (i.e. imperative), decompose programs into subroutine, sub-subroutine and so on
- Tells the computer to run the program in a sequence of steps
- Language: C

2. Functional
- No side effect, all effects are returned as return-value
- Language: Lisp, Scheme

3. Logic/Predicative
- Language: Prolog

4. Object Oriented

5. Aspect Oriented
- Derived from OO
- (Aspect C++) http://www.aspectc.org/

6. Reflection Oriented
- Derived from OO
- (Reflection in C++) http://www.garret.ru/cppreflection/docs/reflect.html