Wednesday, October 21, 2009
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:
Getting the script path
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
Saturday, August 1, 2009
Wednesday, July 8, 2009
Tuesday, June 30, 2009
Tuesday, February 24, 2009
Architecture/Design Analysis and UML Diagramming
1. Activity diagram to describe process view (thread and flowchart)
http://download.boulder.ibm.com/ibmdl/pub/software/dw/rationaledge/may01/UsingUMLActivityDiagramsfortheProcessViewMay01.pdf
http://download.boulder.ibm.com/ibmdl/pub/software/dw/rationaledge/may01/UsingUMLActivityDiagramsfortheProcessViewMay01.pdf
Monday, February 23, 2009
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; };
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; };