Gitblit on Linux VM

Installed a nice git repo viewer on my linux VM :

Posted in Uncategorized | Leave a comment

Miniature train set at Boston South Station

Video captured with Pentax K-01. Image sequences edited with Matlab’s image processing toolbox. Audio extracted with Xilisoft. Final video made with Avidemux. **

**Unfortunately, all the software and scripts in the world cannot make up for poor video-taking skills.

Posted in Uncategorized | Leave a comment

A toolsmith

“In contrast with many engineers who make houses, cars, medicines, and clothing for human need and enjoyment, we make things that do not themselves directly satisfy human needs, but which others use in making things that enrich human living. In a word, the computer scientist is a toolsmith—no more, but no less.It is an honorable calling. 

If we perceive our role aright, we then see more clearly the proper criterion for success: a toolmaker succeeds as, and only as, the users of his tool succeed with his aid. However shining the blade, however jeweled the hilt, however perfect the heft, a sword is tested only by cutting. That swordsmith is successful whose clients die of old age.”


Posted in Uncategorized | Leave a comment

Starting ParaView Client and Server for head-tracking (Windows)

Optional (on a machine with single processor, probably not needed – changes depending on ParaView implementation):

  1. Install MPICH2 (binaries sufficient)
  2. Configure ParaView to use MPI in CMake (turn PARAVIEW_USE_MPI flag on)
  3. Rebuild ParaView

Start ParaView Server:

  • with MPI:
    • Open your favorite command-line interpreter. For the following commands, replace the path with one that uses the correct shell path separator
    • Command:
      cd PATH_TO_MPI
      mpiexec.exe -np NUM_PROCESSORS PATH_TO_PARAVIEW_BIN\pvserver.exe PATH_TO_CAVE\cave.pvx
    • PATH_TO_MPI = Path to mpiexec.exe, e.g. C:\Program Files (x86)\MPICH2\bin\
    • NUM_PROCESSORS = number of processors to be used by ParaView Server
    • PATH_TO_PARAVIEW_BIN = e.g. C:\User\<user_name>\Documents\EVE\Collab\CompiledParaView\bin\Debug\
    • PATH_TO_CAVE = e.g. C:\User\<user_name>\Documents\EVE\Collab\ParaView
  • without MPI:
      • Open your favorite command-line interpreter. For the following commands, replace the path with one that uses the correct shell path separator
      • Command:
        PATH_TO_PARAVIEW_BIN\pvserver.exe PATH_TO_CAVE\cave.pvx

The commands above will result in:

Waiting for client…
Connection URL: cs://<machine_name>:11111
Accepting connection(s): <machine_name>:11111

Start VRPN Tracking Server:—use-vrpn#TOC-Configuring-VRPN-server

Start ParaView Client:

** Actually a large part of the panel will be blocked by the ParaView Splash image. The Splash Image can be disabled using the ParaView Setting panel. Just start the standard ParaView application (with the built-in server) and disable the Splash image before starting the server and client separately.

Posted in Uncategorized | Tagged | Leave a comment

Attempt to create Dock Window to configure VR connections in ParaView

Standard way of adding a QDockWidget to a Plugin in ParaView:

  1. Look at ParaView/Examples/Plugins/DockWidget
  2. Use the ADD_PARAVIEW_DOCK_WINDOW macro defined in ParaView/CMake/ParaViewPlugins.cmake
  3. Result of the CMake macro: a file called ${ARG_CLASS_NAME}Implementation.h (which implements the pqDockWindowInterface) is created and compiled into the Qt project via the Qt Meta Object Compiler *
  4. pqPluginDockWidgetsBehavior calls each pqDockWindowInterface::dockWidget to create an instance of the plugin-specific class that extends QDockWidget

Problem: pqVRConfigPanel, which extends QDockWidget, is not aware of VR Plugin instance, and VR Plugin instance is not aware of pqVRConfigPanel class. The QDockWidget signals cannot be connected VR Plugin slots.

Solution attempt 1:

  1. Make pqVRStarter implement pqDockWindowInterface.
  2. Create dockWidget in the pqVRStarter::onStartup() slot. I.e. invoke pqVRStarter::dockWidget() with pqCoreUtilities::mainWidget() as parent parameter (pqCoreUtilities::mainWidget() returns the QMainWindow of the application)


Runtime error because pqVRStarter::onStartup() is called before ParaViewMainWindow (which extends QMainWindow) is finalized. The dockWidget could not be properly embedded in the UI.

Solution attempt 2 (to do):

  1. Edit VR Plugin’s CMakeLists.txt to register the CMake-generated pqVRStarterImplementation as a pqDockWindowInterface. This may create the VR Plugin’s QDockWidget at the same time as the other QDockWidget’s creation in pqPluginDockWidgetsBehavior

* Qt prohibits a class that inherits from a Qt class to contain multiple inheritance since Qt classes are not implemented via  virtual inheritance. To work around this, Qt interface can be used

** CMake Macro for creating pqDockWindowInterface:

# create implementation for a dock window interface
# CLASS_NAME classname
# [DOCK_AREA areaname]
# CLASS_NAME: is the name of the class that implements a QDockWidget
# DOCK_AREA: option to specify the dock area (Left | Right | Top | Bottom)
# Left is the default
Posted in Uncategorized | Tagged | Leave a comment

C++ STL Hashmaps

Note:  STL here refers to SGI STL , not to be confused with the C++ Standard Library , which only recently include hash maps/sets in C++11 . For pre-C++11 users, hash maps/sets are included under the name unordered_map/unordered_set in std::tr1 as explained in the article:



hash_maps store key/value pairs that have unique keys.
hash_sets store unique values.
hash_multimaps store key/value pairs with nonunique keys.
hash_multisets store nonunique values  

When to use hash functions: 
trade offs - how often do the key/value pair change 
vs frequency & performance of accesses 
vs memory allocation
Hash function:
Most primitives hash to themselves: integers, 
characters, and longs all simply cast to size_t

SizeTCastHasher - hash based on memory location

ShiftedPairHasher - hash a pair of integers 
(bitwise shift first integer, then XOR, to fit 
both integers in a size_t)  
Memory allocation: 
Map --> RB tree , a few pointers, 
Hashmap - 193 buckets  

Must Benchmark: 
Hash function calculation time 
vs hash function collision resolution  


Posted in Uncategorized | Leave a comment

Protected: Collaboration Workbench Transition notes

This content is password protected. To view it please enter your password below:

Posted in Uncategorized | Tagged ,