I am Charmie

メモとログ

2014-01-01から1年間の記事一覧

OpenMP: minimum code

Here's a minimum code of OpenMP with CMake. The code outputs "OpenMP: ON" if OpenMP is available and "OpenMP: OFF" otherwise. CMakeLists.txt: [code lang="cmake"] cmake_minimum_required(VERSION 2.8) set(PROJ_NAME OpenMPtest) PROJECT(${PROJ_…

Beamer: Navigation bar jumps to wrong slide

I made some slides using Beamer, however I thought Beamer has a serious problem and therefore I gave up using it. The problem is navigation bar icon jumps to wrong slide, which is the next slide of the right one. Back to the problem again,…

MatLab code decompose an image to patches

I uploaded my code, which decomposes an image to patches, on my git. The repository contains 2 basic functions and 1 demo code: im2patch.m: decomposes an image into a set of image patches patch2im.m: forms an image by merging a set of imag…

Import Mail from SeaMonkey to Thunderbird

I changed my mailer from lovely SeaMonkey to Thunderbird. Since I couldn't find nice guidance on the web, I copy-and-pasted all files, which of course include a lot of unnecessary files :(, from /.mozilla/seamonkey// to /.mozilla/firefox//…

Import protected password from SeaMonkey to FireFox

I changed my web browser from lovely SeaMonkey to FireFox. Following this, I could import all password settings! SeaMonkey: Ver. 2.31 FireFox: Ver. 34.0 Specifically, I copied the following files and it worked!: cert8.db cookies.sqlite for…

Import bookmark from SeaMonkey to FireFox

I changed my web browser from lovely SeaMonkey to FireFox. The versions are: SeaMonkey: Ver. 2.31 FireFox: Ver. 34.0 Specifically, I used bookmarkbackup since SeaMonkey and FireFox use same format for bookmark backup. Copy latest bookmark …

PPT art advent calendar

Advent calendar is to count how many days remaining before Christmas. Following calendars of programming, I decided to make my own advent calendar to make a new PPT art.

VTK 6.1.0 build on Ubuntu 14.04

following the guidance, it's easy to build VTK 6.1.0 on Ubuntu 14.04 [code language="bash"] wget http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz wget http://www.vtk.org/files/release/6.1/VTKData-6.1.0.tar.gz wget http://www.vtk.org/f…

Blitz++: Power iteration

Tensor Power iteration using Blitz++. The following code is too dirty. [code lang="cpp"] include <iostream> include <blitz/array.h> include <random/uniform.h> include <time.h> include <ctime> include <algorithm> ifdef BZ_HAVE_STD include <fstream> else include <fstream.h> endif blitz::firstIndex i1;…</fstream.h></fstream></algorithm></ctime></time.h></random/uniform.h></blitz/array.h></iostream>

PTAM on Ubuntu 14.04 pt.2

I made a repository for enabling PTAM compilable on Ubuntu 14.04 with CMake on github. The script file is based on PTAM-linux-cv2.3(https://github.com/nttputus/PTAM-linux-cv2.3) and assumes that you also use it. The contained files are: PT…

PTAM on Ubuntu 14.04

This post is for compiling PTAM (Parallel Tracking and Mapping) on Ubuntu 14.04. As mentioned on the web, a cool guy published a set of script, patch, etc for PTAM easy-compile on Ubuntu and the files are available on this github. However,…

Ubuntu adobe flash playerの文字化け

[code lang="bash"] sudo apt-get install fonts-arphic-uming fc-cache -fv sudo cp /usr/share/fonts/truetype/takao-gothic/TakaoPGothic.ttf /usr/share/fonts/truetype/arphic/uming.ttc [/code] from here

Nemo file manager installation on Ubuntu 14.04

Default file manager on Ubuntu 14.04 is shit for me because the format of modified time shown on the file manager is uncustomizable. Google search told me there are two solutions, (1) compile the nautilus from the source or (2) use another…

ImageMagick: align images

convert function with append option aligns multiple images either horizontally or vertically. convert +append does horizontally while convert -append vertically. [code lang="bash"] convert +append img1.jpg img2.jpg ... imgAlignHorizontally…

VXL installation on ubuntu 14.04

VXL is a C++ library for computer vision researches. The core libraries in VXL are: vnl for numerical algorithms vil for image handling vgl for geometry etc. VXL can be installed via package manager as [code lang="bash"] sudo apt-get insta…

C++: give std::vector as array

There exist several ways to give a std::vector as an array. Suppose we have a vector std::vector vec. The ways are &vec[0] &vec.front() vec.data() supported by C++11 The following code should output as print integer array: 0,1,2,3,4, print…

CImg: hello world

I implemented CImg hello world that loads an image, display on a CImg window, and save it. The complete code is available on my github. [code lang="cpp"] include <iostream> include <string> include <CImg.h> int main() { std::cout << "run CImg hello world..." << std</cimg.h></string></iostream>…

Blitz++: some sample code

I implemented some functions those are explained in Blitz++ documentation. The code is on my github.

Eigen: select columns with N largest norm 2

PTAM/Build/Linux/VideoSource_Linux_OpenCV.ccThis post is to measure the computation time of the previous post, in which I posted a C++ code using Eigen to select columns with N largest norm. My code is available here. Suppose we define a f…

Eigen: select columns with N largest norm

The following code selects columns with N largest norm. The output should be All data and its norm: data[0] = ( 68.0375 -21.1234) norm = 71.2412 data[1] = (56.6198 59.688) norm = 82.2707 data[2] = ( 82.3295 -60.4897) norm = 102.162 data[3]…

C++: lower bound and upper bound of std::vector

lower bound and upper bound of a std::vector can be found by functions lower_bound and upper_bound. The following code finds lower bound and upper bound of a std::vector data. The output should be Raw data: 0 3 7 2 9 1 5 4 8 3 1 2 Sorted d…

C++: initialize std::vector

The following code initializes 1 and 2 dimensional std::vector with its size and initial value. The output should be declare 1 dimensional vector of size 4 with initial value 3 generated vector is size 4 vector: vec[0] = 3 vec[1] = 3 vec[2…

C++ function pointer

[sourcecode language="cpp"] template <typename ValueType> struct funcPtr { typedef ValueType (*func)(const ValueType, const ValueType); }; template <typename ValueType> ValueType add( const ValueType a, const ValueType b ) { return a+b; } template <typename ValueType> ValueType sub( const ValueType</typename></typename></typename>…

Blitz++: documentation

./configure make pdfevince ./doc/blitz.pdf

Blitz++ installation on Ubuntu 14.04

Blitz++ is a c++ template library for array manipulation. I'm planning to use this library for some tensor computation. Fortunately, we can install the library via Ubuntu package manager as [code lang="bash"] sudo apt-get install libblitz-…

github: upload an empty directory

It's technically impossible to commit an empty directory to github because github only manages files. However, there exists a practical solution that stores a .gitignore file inside a directory and commit the .gitignore file so that the di…

github: delete a previous commit

suppose we would like to cancel N commits [code lang="bash"] git reset --hard HEAD~N git push origin -f [/code] ,where N is the number of revert. Note that this commands may be wrong. I'll check how git reset works and then put detailed in…

github: create a new repository

so far I cannot create a new repository from terminal... So, I first create a new repository via github web GUI. and then [code lang="bash"] git clone URL git add FILES git commit -m "MESSAGE" git push origin master [/code]

CodeSynthesis XSD installation 2

With Ubuntu package manager, we can install both CodeSynthesis XSD and Xerces-C as [code lang="bash"] sudo apt-get install libxerces-c-dev sudo apt-get install xsdcxx [/code] To generate a class, the command xsdcxx executes code synthesis …

桐光学園バスケットボール部OB会ホームページ

タイトル通り桐光学園バスケットボール部OB会のホームページを作成しました.現時点で以下のコンテンツを載せていますが,今後中身の変更が行われる可能性はあります. OB会SNSへの登録OB会イベント日程桐光学園バスケ部の試合予定及び結果桐光学園バスケ部…