### Check Soduku Solution

The objective of Soduku game is to fill a $$9 \times 9$$ grid with digits so that each column, each row, and each of the nine $$3 \times 3$$ sub-grids that compose the grid (also called “boxes”, “blocks”, “regions”, or “sub-squares”) contains all of the digits from 1 to 9. A solved Soduku game is like:

### Least Recently Used(LRU) Cache

According to LeetCode:

### Binary Tree Operations(I)

This is the first article on binary tree operations. For other topics on binary tree, please refer to:

### Action Recognition with Fisher Vectors

This is a summary of doing human action recognition using Fisher Vector with (Improved) Dense Trjectory Features(DTF, http://lear.inrialpes.fr/~wang/improved_trajectories) and STIP features(http://crcv.ucf.edu/ICCV13-Action-Workshop/download.html) on UCF 101 dataset(http://crcv.ucf.edu/data/UCF101.php). In the STIP features, two low-level visual features HOG and HOF are integrated, with dimensions 72 and 90 respectively. The (improved) DTF employ more features(TR, HOG, HOF and MBHx/MBHy) with longer dimensions.

### How To Install Jekyll in Mac OSX Mavericks

1. Procedure of installing Jekyll in Mac OS X

2. Install Xcode Command line tools: http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools

3. Clang error during install Jekyll

 clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the future make: *** [redcarpet.bundle] Error 1 Mar 26, 2014 C++ Code to Print Pascal Triangle Printing Pascal Triangle seems like an easy problem, however, it is not that easy to print a good-looking Pascal Triangle.  To print the Pascal Triangle, for each line, first print spaces to the left of numbers, and then print digit numbers. To calculate Pascal numbers, two assays can be used: one array to store numbers of above line, the other array to store numbers of this line. The first line has 1 number(1), the second lien has 2 numbers(1 1), the third line has three numbers(1 2 1) and so on. To make the Pascal Triangle more readable, print spaces between two neighbor  numbers in the same line. // Pascal triangle #include #include #include using namespace std; const int WIDTH=7; int main() { int* oldarr=new int[WIDTH]; // store numbers of above row int* newarr=new int[WIDTH]; // store numbers of current row for(int i=0;i=1) newarr[i]=1; if(i>=2) { for(int k=1;k bacc . For Linux user, after download and gunzip the BACI executables, please make sure to add balnxxe into your PATH: export PATH=$PATH:/path/to/your/balnxxe (You also can add this line into$HOME/.profile, so that this command will be executed every time you login). If you want to use jBACI(BACI with a graphical IDE), please go to https://code.google.com/p/jbaci/downloads/list, and choose the jbaci-1.4.6.binaries.zip. Unfortunately, currently jBACI is only available for Windows. If you want to use BACI on the Eustis server, please download Linux version BACI first, gunzip it and then upload them into your home folder of Eustis server. Please remember to add BACI executables into your PATH(as step 3). NetBeans + BACI plugin is the best choice for people who prefer a modern IDE or MAC users. You need to install NetBeans first, and then follow the guide of setting up BaciBeans. NetBeans is a cross-platform IDE, so it can work on all operating systems that have Java JDK installed. Compile and run BACI program Make sure that bacc is in your PATH, or put your BACI program in the same folder of bacc. Note the .cm extension. This is the extension that identifies BACI source files to the BACI compiler. Invoke the compile command bacc your_prog.cm. This creates an object file called your_prog.pco and also a listing file called your_prog.lst. Invoke the interpreter through the command bainterp your_prog (please note, there is no suffix here) to execute your code. bainterp has an option -t that will display the order in which processes terminate within the program. Verify the installation of BACI Download example.cm. Run command  bacc example.cm. If you see following outputs, then the example.cm is successfully compiled: bo@HEC-2GQFTK1:~/Documents/BACI$bacc example.cm Pcode and tables are stored in example.pco Compilation listing is stored in example.lst Execute command bainterp -t example. If you get following message, then bainterp runs correctly. bo@HEC-2GQFTK1:~/Documents/BACI$ bainterp -t example Source file: example.cm  Wed Jan 22 15:16:12 2014 Executing PCODE ... before v(count) value of count is 0 process 2 increment,  procedure increment ended before p(count) value of count is 1 process 1 decrement,  procedure decrement ended More Options of BACI Compiler A BACI source file using the C-- compiler should use a .cm suffix. To execute a program in BACI, there are two steps: 1. Compile a ".cm" file to obtain a PCODE file (.pco) Usage: bacc [optional_flags] source_filename Optional_flags: -h show this help -c make a .pob object file for subsequent linkingInterpret a PCODE file (.pco) to execute the program 2. Usage bainterp [optional_flags] pcode_filename Optional_flags: -d enter the debugger, single step, set breakpoints -e show the activation record (AR) on entry to each process -x show the AR on exit from each process -t announce process termination -h show this help -p show PCODE instructions as they are executed There is a shell script, baccint, that will call the compiler and then call the interpreter for you. It passes the options that you give it along to the interpreter. If you are using the Pascal compiler syntax, then the source file should be with a .pm suffix, and you compile the program with the bapas compiler. Jan 10, 2014 Dense Trajectory Notes Notes of Dense Trajectories densely sample feature points in each frame track points in the video based on optical flow. compute multiple descriptors along the trajectories of feature points to capture shape, appearance and motion information. Dense Sampling Sampling step size $$W=5$$ pixels # spatial scales ≤ 8 Spatial scale increase: $$1 / \sqrt{2}$$ Removing points in homogeneous areas: $$T=0.001 \times \max_{i \in l}\min(\lambda_{i}^{1},\lambda_{i}^{2})$$, where $$(\lambda_{i}^{1},\lambda_{i}^{2})$$ are eigenvalues of point $$i$$ in image $$I$$ (the auto-correlation matrix). Descriptors Trajectory shape descriptor(TR): where L is the length of trajectory, and the displacement vectors HOG – static appearance information HOF – local motion information MBH – motion descriptor for trajectories Format of DTF features The format of the computed features The features are computed one by one, and each one in a single line, with the following format: frameNum mean_x mean_y var_x var_y length scale x_pos y_pos t_pos Trajectory HOG HOF MBHx MBHy The first 10 elements are information about the trajectory: frameNum:     The trajectory ends on which frame mean_x:       The mean value of the x coordinates of the trajectory mean_y:       The mean value of the y coordinates of the trajectory var_x:        The variance of the x coordinates of the trajectory var_y:        The variance of the y coordinates of the trajectory length:       The length of the trajectory scale:        The trajectory is computed on which scale x_pos:        The normalized x position w.r.t. the video (0~0.999), for spatio-temporal pyramid y_pos:        The normalized y position w.r.t. the video (0~0.999), for spatio-temporal pyramid t_pos:        The normalized t position w.r.t. the video (0~0.999), for spatio-temporal pyramid The following element are five descriptors concatenated one by one: Trajectory:    2x[trajectory length] (default 30 dimension) HOG:           8x[spatial cells]x[spatial cells]x[temporal cells] (default 96 dimension) HOF:           9x[spatial cells]x[spatial cells]x[temporal cells] (default 108 dimension) MBHx:          8x[spatial cells]x[spatial cells]x[temporal cells] (default 96 dimension) MBHy:          8x[spatial cells]x[spatial cells]x[temporal cells] (default 96 dimension) Improved Dense Trajectories Explicit camera motion estimation Assumption: two consecutive frames are related by a homography. Match feature points between frames using SURF descriptors and dense optical flow Removing inconsistent matches due to humans: use a human detector to remove matches from human regions (computation expensive) Estimate a homography with RANSAC with these matches References: H Wang, C Schmid, Action recognition with improved trajectories, ICCV 2013 H Wang, A Kläser, C Schmid, CL Liu, Dense trajectories and motion boundary descriptors for action recognition, International Journal of Computer Vision, May 2013, Volume 103, Issue 1, pp 60-79 ← Newer Page: 5 of 24 Older → (adsbygoogle = window.adsbygoogle || []).push({}); Sometimes life is going to hit you in the head with a brick. Don't lose faith. Recent Posts How to terminate a C++ std::thread? My First Taste of Computational Stock Analysis Python - Run Command With Timeout Shared-memory Based Ring Buffer Coredump Decode (adsbygoogle = window.adsbygoogle || []).push({}); © 2007-2018 Bo Yang. Powered by Jekyll   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '', 'auto'); ga('send', 'pageview');