suusiki

Test

Posted in Uncategorized by suusiki on January 24, 2009
]sourcecode language=" "]

[/sourcecode]

 

* actionscript3

* bash
* clojure
* coldfusion
* cpp
* csharp
* css
* delphi
* erlang
* fsharp
* diff
* groovy
* html
* javascript
* java
* javafx
* matlab (keywords only)
* objc
* perl
* php
* text
* powershell
* python
* r
* ruby
* scala
* sql
* vb
* xml

 

About these ads

1,275 Responses

Subscribe to comments with RSS.

  1. Anonymous said, on January 27, 2009 at 1:59 pm

    see J. P. Wright, “Numerical instability due to varying time
    steps…”, JCP 1998

    Read:
    Reeves, “Particle systems…”, SIGGRAPH!83
    Sims, “Particle animation and rendering using
    data parallel computation”, SIGGRAPH ’90
    Miller & Pearce, “Globular dynamics…”,
    SIGGRAPH “89

    Regions of stability, equivalence theorems and the Courant-Friedrichs-Lewy condition pdf

    Krylov Methods

  2. Anonymous said, on January 27, 2009 at 2:00 pm

    大規模連立一次線形方程式.ppt

    Direct Solution of linear systems
    Ax=b x=A-1b
    ? Almost never a good idea to construct inverse to solve
    ? Computing inverse is more expensive than solving system
    ? Computing inverse leads to loss of precision
    ? Exceptions
    ? Analytical expression for inverse can be obtained, e.g.,

    GS is more difficult to parallelize than Jacobi. Then, why do we use GS?

    Memory requirement: GS = Jacobi / 2

    GS converges faster, especially for high frequency (oscillatory) error

    Jacobi eliminates low frequency (smooth) error more quickly than GS, but this problem of GS can be cured by Multigrid methods

  3. Anonymous said, on January 27, 2009 at 3:12 pm

    http://commentbook.jugem.jp/?eid=107

  4. Anonymous said, on January 27, 2009 at 4:46 pm

    http://www.cymric.jp/old/tex/meadow.html

  5. Anonymous said, on January 27, 2009 at 7:06 pm

    http://www.pletscher.org/writings/latex/beamerthemes.php

  6. Anonymous said, on January 27, 2009 at 7:07 pm

    Beamer template

    http://www.pletscher.org/writings/latex/beamerthemes.php

  7. Anonymous said, on January 28, 2009 at 2:00 am

    http://uit.no/getfile.php?PageId=874&FileId=555

  8. Anonymous said, on January 29, 2009 at 11:12 am

    Beamer arrows
    http://www.texample.net/tikz/examples/beamer-arrows/

  9. Anonymous said, on January 29, 2009 at 3:16 pm

    #define CHECK_BANK_CONFLICTS 0
    #if CHECK_BANK_CONFLICTS
    #define AS(i, j) cutilBankChecker(((float*)&As[0][0]), (BLOCK_SIZE * i + j))
    #define BS(i, j) cutilBankChecker(((float*)&Bs[0][0]), (BLOCK_SIZE * i + j))
    #else
    #define AS(i, j) As[i][j]
    #define BS(i, j) Bs[i][j]
    #endif

  10. Anonymous said, on January 29, 2009 at 4:20 pm

    http://wiki.livedoor.jp/mikk_ni3_92/d/CUDA::%B4%F0%CB%DC%CA%D403

  11. Anonymous said, on January 29, 2009 at 5:06 pm

    プログラムの流れ
    http://www.geeks3d.com/?p=1685

  12. Anonymous said, on January 30, 2009 at 10:52 am

    CUDA のinstall
    http://tech.ckme.co.jp/cuda_inst.shtml

  13. Anonymous said, on January 30, 2009 at 12:04 pm

    ファイルを分割

    http://www.rsch.tuis.ac.jp/~mizutani/online/latex/split.html

  14. Anonymous said, on January 31, 2009 at 3:25 pm

    Bank conflict code

    http://d.hatena.ne.jp/nishiohirokazu/20081223/1230022340

  15. Anonymous said, on February 1, 2009 at 5:28 pm

    物理学や工学などに現れる重要な現象のほとんどは、「偏微分方程式」(複数の独立
    変数による微分が現れる微分方程式)によって記述されており、その多くは、「非線形性」
    と呼ばれる、「二つの解の足し算が必ずしも解にならない」という際立った性質をもって
    います。
      これらの解を探す場所(空間)として、バナッハ空間やヒルベルト空間(ピタゴラスの定
    理が成り立つようなユークリッド空間の拡張概念)などと呼ばれる、無限次元空間をとり、
    ここでどのような解析学が成り立つかを研究する立場をとる学問が、「関数解析学」です。
      無限次元の世界においては、有限次元における解析学と同様な多くの事実が成り立
    つと同時に、有限次元の常識では考えられない不思議なことも多く起こります。たとえば、
    無限次元ヒルベルト空間においては、ベクトル列の収束(ベクトル列が、あるベクトルに
    近づいていくこと)に関して、強収束と弱収束という2種類の定義ができますが、有限次
    元の場合、これらは同等な性質となってしまいます。さらに、有限次元空間においては、
    あるベクトル列が、長さを1に保ちながら0ベクトルに収束することは不可能ですが、無
    限次元空間ヒルベルト空間における弱収束の世界では、これが可能になります。

  16. Anonymous said, on February 4, 2009 at 10:50 am

    http://www.evl.uic.edu/aej/525/lecture05.html

  17. Anonymous said, on February 4, 2009 at 2:02 pm

    日本語の install
    http://www.kumikomi.net/article/explanation/2008/12gpu1/06.html

  18. Anonymous said, on February 4, 2009 at 3:47 pm

    nvcc and cls

    http://forums.nvidia.com/index.php?act=ST&f=71&t=64979

  19. Anonymous said, on February 4, 2009 at 4:18 pm

    Set up enviroment for windows

    http://waooo.sourceforge.jp/wiki/index.php?Setup%20Build%20Environment%20for%20Windows

  20. Anonymous said, on February 4, 2009 at 5:07 pm

    set path without reboot

    if you Update Windows Path variables and click ok. they donot show up but if you end explorer.exe task and run a new explorer.exe task up it will now refresh with the new path variable

  21. Anonymous said, on February 4, 2009 at 5:49 pm

    echo path
    http://forums.nvidia.com/index.php?showtopic=65457

  22. Anonymous said, on February 4, 2009 at 7:50 pm

    nvcc

    http://monologuemidnight.blogspot.com/2009/01/cuda_20.html

  23. Anonymous said, on February 5, 2009 at 8:18 pm

    https://www.sbibusiness.com/wikipedia/GPGPU

  24. Anonymous said, on February 7, 2009 at 1:09 pm

    CUDA

    https://www.sbibusiness.com/wikipedia/GPGPU

  25. Anonymous said, on February 7, 2009 at 3:37 pm

    http://faq.ubuntu-world.biz/2007/09/nvidia.html

  26. Anonymous said, on February 18, 2009 at 12:25 pm

    Windows has (used to have?) a line set tmp=temp in one of the ini.files… thus allowing a single temp folder to be used for both versions of temporary files. There was usually a similar line in the dos config file.

  27. Anonymous said, on February 18, 2009 at 2:06 pm

    http://vlaurie.com/computers2/Articles/environment.htm

  28. Anonymous said, on February 20, 2009 at 3:27 pm

    http://tech.ckme.co.jp/cuda_inst.shtml

  29. Anonymous said, on February 20, 2009 at 3:53 pm

    例:プログラムファイル test.c を警告レベル3、『実行速度優先』でコンパイルする

    cl /W3 /O2 test.c

     上記の例では cl はコンパイラのアプリケーション名、/W3 はコンパイラが出力する
    『警告』をどの程度詳細に行うかという度合いを『3』とするオプション、/O2 は
    プログラムをなるべく高速に動作するようにコンパイルするように指示するための
    オプション、と、こんな具合に起動する時に必要な情報は全部渡してやる必要があるわけです。

  30. Anonymous said, on February 20, 2009 at 4:01 pm

    http://sewig.jp/diary/?date=200507

  31. Anonymous said, on February 20, 2009 at 4:05 pm

    3. コンパイルします
    ~~~~~~~~~~~~~~~~~~~

    次のコマンドでコンパイルしてみましょう。

    > cl /c test.cpp

    以下の内容が表示され、test.obj が C:\temp に作成されれば成功です。

    ———- コマンド出力例 ここから ———-
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80×86
    Copyright (C) Microsoft Corporation. All rights reserved.

    test.cpp
    ———- コマンド出力例 ここまで ———-

    ここでは /c オプションを指定しているのは、コンパイルとリンクを同時に行わずに
    コンパイルだけするようにするためです。

    /c を指定しなければ、コンパイルとリンクを続けて行うことが可能です。

    しかし、コンパイラ、リンカーそれぞれへのオプションを明確にするためにも、
    本講座では、初心者の方はそれぞれのプロセスを別々に行うことをお奨めします。

    今回はコマンドラインからコンパイルを行いました。

  32. Anonymous said, on February 20, 2009 at 4:13 pm

    http://www.yasuoka.mech.keio.ac.jp/cuda/mansample.php

  33. Anonymous said, on February 20, 2009 at 4:23 pm

    http://sbel.wisc.edu/Courses/ME964/2008/index.htm

  34. Anonymous said, on February 20, 2009 at 5:19 pm

    C/C++ COMPILER OPTIONS
    -OPTIMIZATION-
    /O1 minimize space /O2 maximize speed
    /Ob inline expansion (default n=0) /Od disable optimizations (default)
    /Og enable global optimization /Oi[-] enable intrinsic functions
    /Os favor code space /Ot favor code speed
    /Ox maximum optimizations /Oy[-] enable frame pointer omission
    -CODE GENERATION-
    /GF enable read-only string pooling /Gm[-] enable minimal rebuild
    /Gy[-] separate functions for linker /GS[-] enable security checks
    /GR[-] enable C++ RTTI /GX[-] enable C++ EH (same as /EHsc)
    /EHs enable C++ EH (no SEH exceptions) /EHa enable C++ EH (w/ SEH exceptions)
    /EHc extern “C” defaults to nothrow
    /fp: choose floating-point model:
    except[-] – consider floating-point exceptions when generating code
    fast – “fast” floating-point model; results are less predictable
    precise – “precise” floating-point model; results are predictable
    strict – “strict” floating-point model (implies /fp:except)
    /GL[-] enable link-time code generation /GA optimize for Windows Application
    /Ge force stack checking for all funcs /Gs[num] control stack checking calls
    /Gh enable _penter function call /GH enable _pexit function call
    /GT generate fiber-safe TLS accesses /RTC1 Enable fast checks (/RTCsu)
    /RTCc Convert to smaller type checks /RTCs Stack Frame runtime checking
    /RTCu Uninitialized local usage checks
    /clr[:option] compile for common language runtime, where option is:
    pure – produce IL-only output file (no native executable code)
    safe – produce IL-only verifiable output file
    oldSyntax – accept the Managed Extensions syntax from Visual C++ 2002/2003
    initialAppDomain – enable initial AppDomain behavior of Visual C++ 2002
    noAssembly – do not produce an assembly
    /Gd __cdecl calling convention /Gr __fastcall calling convention
    /Gz __stdcall calling convention /GZ Enable stack checks (/RTCs)
    /QIfist[-] use FIST instead of ftol()
    /hotpatch ensure function padding for hotpatchable images
    /arch: minimum CPU architecture requirements, one of:
    SSE – enable use of instructions available with SSE enabled CPUs
    SSE2 – enable use of instructions available with SSE2 enabled CPUs
    -OUTPUT FILES-
    /Fa[file] name assembly listing file /FA[scu] configure assembly listing
    /Fd[file] name .PDB file /Fe name executable file
    /Fm[file] name map file /Fo name object file
    /Fp name precompiled header file /Fr[file] name source browser file
    /FR[file] name extended .SBR file
    /doc[file] process XML documentation comments and optionally name the .xdc file
    -PREPROCESSOR-
    /AI add to assembly search path /FU forced using assembly/module
    /C don’t strip comments /D{=|#} define macro
    /E preprocess to stdout /EP preprocess to stdout, no #line
    /P preprocess to file /Fx merge injected code to file
    /FI name forced include file /U remove predefined macro
    /u remove all predefined macros /I add to include search path
    /X ignore “standard places”
    -LANGUAGE-
    /Zi enable debugging information /Z7 enable old-style debug info
    /Zp[n] pack structs on n-byte boundary /Za disable extensions
    /Ze enable extensions (default) /Zl omit default library name in .OBJ
    /Zg generate function prototypes /Zs syntax check only
    /vd{0|1|2} disable/enable vtordisp /vm type of pointers to members
    /Zc:arg1[,arg2] C++ language conformance, where arguments can be:
    forScope[-] – enforce Standard C++ for scoping rules
    wchar_t[-] – wchar_t is the native type, not a typedef
    /ZI enable Edit and Continue debug info
    /openmp enable OpenMP 2.0 language extensions
    -MISCELLANEOUS-
    @ options response file /?, /help print this help message
    /bigobj generate extended object format /c compile only, no link
    /errorReport:option Report internal compiler errors to Microsoft
    none – do not send report
    prompt – prompt to immediately send report
    queue – at next admin logon, prompt to send report (default)
    send – send report automatically
    /FC use full pathnames in diagnostics /H max external name length
    /J default char type is unsigned /nologo suppress copyright message
    /showIncludes show include file names /Tc compile file as .c
    /Tp compile file as .cpp /TC compile all files as .c
    /TP compile all files as .cpp /V set version string
    /w disable all warnings /wd disable warning n
    /we treat warning n as an error /wo issue warning n once
    /w set warning level 1-4 for n /W set warning level (default n=1)
    /Wall enable all warnings /WL enable one line diagnostics
    /WX treat warnings as errors /Yc[file] create .PCH file
    /Yd put debug info in every .OBJ /Yl[sym] inject .PCH ref for debug lib
    /Yu[file] use .PCH file /Y- disable all PCH options
    /Zm max memory alloc (% of default) /Wp64 enable 64 bit porting warnings
    -LINKING-
    /LD Create .DLL /LDd Create .DLL debug library
    /LN Create a .netmodule /F set stack size
    /link [linker options and libraries] /MD link with MSVCRT.LIB
    /MT link with LIBCMT.LIB /MDd link with MSVCRTD.LIB debug lib
    /MTd link with LIBCMTD.LIB debug lib

  35. Anonymous said, on February 20, 2009 at 5:42 pm

    Configuration Properties → Custom Build Step → General:
    Command Line =
    “$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/MTd -I”$(CUDA_INC_PATH)” -I./ -o $(ConfigurationName)\example1.obj example1.cu

    What does this command line do? Let’s break it down piece-by-piece:

    “$(CUDA_BIN_PATH)\nvcc.exe”: The location of the nvcc compiler.

    -ccbin “$(VCInstallDir)bin”: The location of the Visual C++ compiler.

    -c: The compilation will proceed all the way to the generation of an object file (.obj extension).

    -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS: Various macro definitions.

    -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/MTd: Various options that are passed by nvcc directly to the Visual C++ compiler.

    -I”$(CUDA_INC_PATH)”: Look in the CUDA include directories for needed header files.

    -I./: Look in the current directory for needed header files.

    -o $(ConfigurationName)\example1.obj: The location and name of the resulting object file.

    example1.cu: The source file that the compiler will work on.

  36. Anonymous said, on February 21, 2009 at 12:06 pm

    http://forums.nvidia.com/index.php?showtopic=81153

  37. Anonymous said, on February 21, 2009 at 2:25 pm

    そりゃ当然lessのほうが便利ですよね。上に戻れるんですから。というかmoreを拡張したのがlessなんで(こういう外国人のネーミングセンスが素敵)便利なのは当たり前か。

    でも何故かうちの課の人たちは良くmoreを使う。後ろなんて振り返るんじゃねぇ!ということでしょうか。なんて男らしい集団なんだ。

    んで、そんなクセがうつったのかは知りませんが、俺も最近moreを良く使ってしまう。何より、”less”より”more”のほうが入力しやすいんですよね。キー配置的に。3倍ぐらいmoreのほうが打ちやすい。パイプ通して結果確認するときなんか無意識にmoreを使ってしまう。でもやっぱりlessのほうが便利なんですよね、それは頭ではわかってる。このジレンマを解決するたった一つの方法を発見。

    alias more=’less’

    完璧

  38. Anonymous said, on February 21, 2009 at 3:26 pm

    Short cut key for gnome_terminal
    http://ubuntu-tutorials.com/2007/02/20/shortcut-keys-you-might-not-know-about/

  39. Anonymous said, on February 21, 2009 at 4:39 pm

    Linux compile a Cuda program
    http://www.yasuoka.mech.keio.ac.jp/cuda/mansample.php

  40. Anonymous said, on February 21, 2009 at 4:51 pm

    Batch rename
    http://lifeofaprogrammergeek.blogspot.com/2008/07/batch-rename.html

  41. Anonymous said, on February 21, 2009 at 4:59 pm

    Minimum cuda
    http://public.procoders.net/cuda_template/

  42. Anonymous said, on February 21, 2009 at 5:21 pm

    Index: /feraparda/branches/gpu/src/Makefile.conf
    ===================================================================
    — /feraparda/branches/gpu/src/Makefile.conf (revision 3578)
    +++ /feraparda/branches/gpu/src/Makefile.conf (revision 3623)
    @@ -1,13 +1,24 @@
    -CC=gcc
    -CXX=g++
    -MPICXX=mpicxx
    -VOID_DIR=${HOME}/datacutter/anthill_3.2
    +CC := gcc
    +CXX := g++
    +NVCC := nvcc
    +MPICXX := mpicxx

    -OPTIMIZATION= -O2
    +OPTIMIZATION := -O2
    +LOG_ENABLED := -DLOG_ENABLED
    +CFLAGS := -Wall -fPIC ${OPTIMIZATION} ${LOG_ENABLED} -DNDEBUG #-g

    -LOG_ENABLED = -DLOG_ENABLED
    -CFLAGS = -Wall -fPIC ${OPTIMIZATION} ${LOG_ENABLED} -DNDEBUG #-g
    -INCLUDES = -I${PVM_ROOT}/include -I${VOID_DIR}/FilterDev -I${VOID_DIR} -I${VOID_DIR}/Hash -I${VOID_DIR}/comm_api
    -CLIBS = -lexpat -L../.. -L${VOID_DIR} -L${PVM_ROOT}/lib/LINUX -lds -lpvm3 -ldl
    +VOID_DIR := ${HOME}/datacutter/anthill_3.2
    +INCLUDES := -I${PVM_ROOT}/include -I${VOID_DIR}/FilterDev -I${VOID_DIR} -I${VOID_DIR}/Hash -I${VOID_DIR}/comm_api
    +CLIBS := -lexpat -L../.. -L${VOID_DIR} -L${PVM_ROOT}/lib/LINUX -lds -lpvm3 -ldl

    +# Compiler options for nvcc (it dosn’t accept -Wall and -fPIC directly)
    +NVCCFLAGS := –compiler-options “-Wall -fPIC” -arch sm_11
    +
    +# Debug/release configuration
    +#NVCCFLAGS += -g -deviceemu -DDEBUG -D_DEBUG ${LOG_ENABLED}
    +NVCCFLAGS += -O3 –use_fast_math -DNDEBUG ${LOG_ENABLED}
    +
    +CUDA_INSTALL_PATH ?= /usr/local/cuda2/cuda
    +NVCCINCLUDES := -I$(CUDA_INSTALL_PATH)/include $(INCLUDES)
    +
    Index: /feraparda/branches/gpu/src/reader/CudaComparator/Makefile
    ===================================================================
    — /feraparda/branches/gpu/src/reader/CudaComparator/Makefile (revision 3622)
    +++ /feraparda/branches/gpu/src/reader/CudaComparator/Makefile (revision 3623)
    @@ -3,15 +3,4 @@
    include ${TOPDIR}/Makefile.conf

    -
    -################################################################################
    -#
    -# Build script for project
    -#
    -################################################################################
    -
    -CUDA_SDK := $(HOME)/cuda_sdk
    -
    -CUTIL_INCLUDES := $(CUDA_SDK)/common/inc
    -CUTIL_LIBRARY_PATH := $(CUDA_SDK)/lib

    # Add source files here
    @@ -26,60 +15,16 @@
    .SUFFIXES : .cu .cu_dbg_o .c_dbg_o .cpp_dbg_o .cu_rel_o .c_rel_o .cpp_rel_o .cpp_o .cubin

    -# Compilers
    -NVCC := nvcc
    -CXX := g++
    -CC := gcc
    -LINK := g++ -fPIC
    -
    -# Includes
    -CUDA_INSTALL_PATH ?= /usr/local/cuda
    -INCLUDES += -I$(CUDA_INSTALL_PATH)/include
    -
    -# Warning flags
    -CXXWARN_FLAGS := \
    - -W -Wall \
    - -Wimplicit \
    - -Wswitch \
    - -Wformat \
    - -Wchar-subscripts \
    - -Wparentheses \
    - -Wmultichar \
    - -Wtrigraphs \
    - -Wpointer-arith \
    - -Wcast-align \
    - -Wreturn-type
    -
    -CWARN_FLAGS := $(CXXWARN_FLAGS) \
    - -Wstrict-prototypes \
    - -Wmissing-prototypes \
    - -Wmissing-declarations \
    - -Wnested-externs \
    - -Wmain
    -
    -# Compiler-specific flags
    -NVCCFLAGS := $(INCLUDES) –compiler-options “-Wall -fPIC” -arch compute_11
    -CXXFLAGS := $(INCLUDES) -Wall -fPIC -DUNIX $(CXXWARN_FLAGS)
    -CFLAGS := $(INCLUDES) -Wall -fPIC -DUNIX $(CWARN_FLAGS)
    -
    -# Debug/release configuration
    -#NVCCFLAGS += -g #-deviceemu -DDEBUG -D_DEBUG
    -#CXXFLAGS += -g
    -#CFLAGS += -g
    -NVCCFLAGS += -O3 –use_fast_math -DNDEBUG
    -CXXFLAGS += -O3 –use_fast_math -DNDEBUG
    -CFLAGS += -O3 –use_fast_math -DNDEBUG
    -
    all:$(TARGET)

    %.o: %.cu %.h Makefile myMalloc.cu BufferControl.h
    - $(NVCC) $(NVCCFLAGS) -c $< -o $@
    + $(NVCC) $(NVCCFLAGS) $(NVCCINCLUDES) -c $< -o $@

    %.o: %.cpp %.h Makefile DmaBuffer.h
    - $(NVCC) $(NVCCFLAGS) -c $< -o $@
    + $(CXX) $(CFLAGS) $(INCLUDES) -c $< -o $@

    -test: Makefile teste.cpp $(CUFILES) CudaComparator.h myMalloc.cu BufferControl.h DmaBuffer.h
    - $(NVCC) $(NVCCFLAGS) $(CUFILES) teste.cpp -o test
    +test: Makefile teste.cpp $(CUFILES) CudaComparator.h myMalloc.cu BufferControl.h DmaBuffer.h readerfilterEmulator.cc readerfilterEmulator.h
    + $(NVCC) $(NVCCFLAGS) $(CUFILES) readerfilterEmulator.cc teste.cpp -o test

    clean:
    - rm -f $(TARGET) *.o core.*
    + rm -f $(TARGET) *.o core.* test

  43. Anonymous said, on February 24, 2009 at 5:51 pm

    http://www.codeguru.com/forum/showthread.php?t=323835

  44. Anonymous said, on February 24, 2009 at 6:07 pm

    isnan function
    http://d.hatena.ne.jp/hajimeN/20080702/1214988122

  45. Anonymous said, on February 24, 2009 at 6:22 pm

    IEEE floating-point exceptions in C++
    http://www.johndcook.com/IEEE_exceptions_in_cpp.html

  46. Anonymous said, on February 24, 2009 at 9:46 pm

    Avoiding Overflow, Underflow, and Loss of Precision

    http://www.codeproject.com/KB/recipes/avoiding_overflow.aspx

  47. Anonymous said, on February 25, 2009 at 1:41 pm

    Debug setting
    http://www.highprogrammer.com/alan/windev/visualstudio.html

  48. Anonymous said, on February 25, 2009 at 5:22 pm

    マルチコアでのさらなる高速化の道を探る Intel と AMD

    http://japan.internet.com/webtech/20081211/12.html

  49. Anonymous said, on February 26, 2009 at 6:43 am

    vi comands
    http://katsubemakito.net/cgiperl/unixlinux/vi/vi-4.html

  50. Anonymous said, on March 4, 2009 at 4:39 pm

    NAN

    http://ml.tietew.jp/cppll/cppll/article/9428

  51. Anonymous said, on March 5, 2009 at 11:05 am

    dung share memory

    http://fw8.bookpark.ne.jp/cm/ipsj/mokuji.asp?category1=Magazine

  52. Anonymous said, on March 7, 2009 at 5:26 pm

    http://forums.nvidia.com/lofiversion/index.php?t66739.html

    sudo apt-get install gcc-4.1 g++-4.1 -y
    cd /usr/bin
    sudo rm gcc g++
    sudo ln -s g++-4.1 g++
    sudo ln -s gcc-4.1 gcc

    if you ever need to change it back,
    sudo rm gcc g++
    sudo ln -s g++-4.2 g++
    sudo ln -s gcc-4.2 gcc

  53. Anonymous said, on March 7, 2009 at 7:20 pm

    xorg-x11-deve
    sudo apt-get install xorg-dev

  54. Anonymous said, on March 7, 2009 at 10:35 pm

    uninstall nvidia driver

    http://forums.nvidia.com/index.php?showtopic=89226&mode=threaded&pid=511350

  55. Anonymous said, on March 7, 2009 at 10:37 pm

    uninstall nvidia dreiver

    http://www.nvnews.net/vbulletin/showthread.php?t=128063

  56. Anonymous said, on March 8, 2009 at 12:06 am

    DISABLED_MODULES=”nv nvidia_new”

    https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.20/+bug/105756

  57. Anonymous said, on March 8, 2009 at 12:07 am

    DISABLED_MODULES=”nv nvidia_new”

    https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.20/+bug/105756

  58. Anonymous said, on March 8, 2009 at 12:41 am

    unload old module of nvidia
    cd /lib/modules/2.6.27-7-generic/updates/dkms
    sudo mv nvidia.ko nvidia.ko.old

  59. Anonymous said, on March 8, 2009 at 1:06 am

    install nvidia driver on ubuntu

    http://d.hatena.ne.jp/kameid/20090210/1234266520

    #CTRL+ALT+F4 – to switch to another console

    #stop the xserver (gdm)

    sudo /etc/init.d/gdm stop

    #list + remove the old stuff related to nvidia

    sudo dpkg -l | grep nvidia

    #`apt-get remove` on whatever comes out of the line above.

    #install the packages which this depends on.

    apt-get install nvidia-glx-180-dev nvidia-180-modaliases nvidia-180-kernel-source nvidia-glx-180

    #remove all the kernel objects currently installed.

    export k=`uname -r`

    sudo rm -f `find /lib/modules/$k -iname nvidia.ko`

    #chmod 777 on the file belwo if necessary.

    sudo ./NVIDIA-Linux-x86-180.22-pkg1.run

    #restart gdm.

    sudo /etc/init.d/gdm start
    180.18 and 180.22 result in low-gfx-mode – Page 2 – nV News Forums

  60. Anonymous said, on March 8, 2009 at 1:09 am

    uninstall nvidia driver

    http://www.nvnews.net/vbulletin/showthread.php?p=1920623

    #CTRL+ALT+F4 – to switch to another console
    #stop the xserver (gdm)
    sudo /etc/init.d/gdm stop

    #list + remove the old stuff related to nvidia
    sudo dpkg -l | grep nvidia
    #`apt-get remove` on whatever comes out of the line above.

    #install the packages which this depends on.
    apt-get install nvidia-glx-180-dev nvidia-180-modaliases nvidia-180-kernel-source nvidia-glx-180

    #remove all the kernel objects currently installed.
    export k=`uname -r`
    sudo rm -f `find /lib/modules/$k -iname nvidia.ko`

    #chmod 777 on the file belwo if necessary.
    sudo ./NVIDIA-Linux-x86-180.22-pkg1.run

    #restart gdm.
    sudo /etc/init.d/gdm start

  61. Anonymous said, on March 8, 2009 at 9:27 am

    kernel-devel install nvidia

    http://mikky3.blog40.fc2.com/blog-entry-111.html

  62. Anonymous said, on March 8, 2009 at 9:45 am

    なぜ tar+gzip はよくないか?

    http://www.linux.or.jp/JF/JFdocs/Backup-mini-HOWTO/tar-gz.html

  63. Anonymous said, on March 8, 2009 at 9:55 am

    直前にいたディレクトリに移動する。
    $ cd ~-

  64. Anonymous said, on March 8, 2009 at 9:55 am

    ■ ワイルドカード

    各種ワイルドカードの使い方。
    拡張子が.tifのファイルを検索表示する。
    $ ls /image/*.tif

    拡張子が3文字のファイルを検索表示する。
    $ ls /image/*.???

    拡張子がgifまたはtifのファイルを検索表示する。
    $ ls /image/*.{gif,tif}

    ファイル名にx,y,zが含まれるものを検索表示する。
    $ ls /image/[x-z]*

  65. Anonymous said, on March 8, 2009 at 9:59 am

    圧縮/展開コマンド一覧

    ●lha圧縮
    lha c dst.lzh src
    ●lha展開
    lha x src.lzh
    lha xw=dst src.lzh

    ●zip圧縮
    zip dst.zip src
    ●zip展開
    unzip src.zip
    unzip src.zip -d dst

    ●Z圧縮
    compress -vf src
    ●Z展開
    compress -d src.Z

    ●tar圧縮
    tar -cvf dst.tar src
    ●tar展開
    tar -xvf src.tar
    tar -xvf src.tar -C dst

    ●gz圧縮
    gzip src
    ●gz展開
    gunzip src.gz

    ●bz2圧縮
    bzip2 src
    ●bz2展開
    bunzip2 src.bz2
    ※(bzip2、bunzip2で入力ファイルを残すには-kを指定します)

    ●tar.gz圧縮
    tar -cvzf dst.tar.gz src
    ●tar.gz展開
    tar -xvzf src.tar.gz
    tar -xvzf src.tar.gz -C dst

    ●tar.bz2圧縮
    tar -cvjf dst.tar.bz2 src
    ●tar.bz2展開
    tar -xvjf src.tar.bz2
    tar -xvjf src.tar.bz2 -C dst

    ●tarコマンドライン
    -c –create 新しい書庫の作成
    -x –extract 書庫からのファイルの取り出し
    -t –list 書庫内の内容のリスト

    -v –verbose 処理されているファイルのリストを冗長に表示

    -z –gzip filter the archive through gzip
    -j –bzip2 filter the archive through bzip2

    -f –file=ARCHIVE 書庫ファイルまたはデバイス ARCHIVE を使用
    -C –directory=DIR change to directory DIR

    http://www.greenwood.co.jp/~k-aki/article/compress_cmd.html

  66. Anonymous said, on March 11, 2009 at 12:09 pm

    Change ‘ls’ directory colors

    http://www.macosxhints.com/article.php?story=20030313182110489

    If you run Terminal.app with a black background and a color ‘ls’ command, directories (in bold blue) can be hard to see. You can change the color of directories with an export LS_COLORS command. For example, to make all directories yellow, add this to “.bash_profile” in your home directory:

    export LS_COLORS=’di=01;33′

    Other good colors for directories are bold white (01;37) and bold purple (01;35). You can find a complete table of ANSI colors in many places; The Linux Documentation Project’s list is one such place.

  67. Anonymous said, on March 12, 2009 at 11:21 am

    Linux

    http://ayapin.film.s.dendai.ac.jp/~matuda/TeX/PDF/

  68. Anonymous said, on March 12, 2009 at 8:16 pm

    Find and copy
    (We don’t usually care about the command-name, so “X”, “dummy”, or “inline cmd” is often used.) Here’s an example of efficiently copying found files to /tmp, in a POSIX-compliant way (Posted on comp.unix.shell netnews newsgroup on Oct. 28 2007 by Stephane CHAZELAS):

    find . -name ‘*.txt’ -type f \
    -exec sh -c ‘exec cp -f “$@” /tmp’ find-copy {} +

    http://content.hccfl.edu/pollock/Unix/FindCmd.htm

  69. Anonymous said, on March 12, 2009 at 9:19 pm

    Build a Beowulf cluster with Red Hat Linux and VMware

    http://articles.techrepublic.com.com/5100-10878_11-5031664.html

  70. Anonymous said, on March 12, 2009 at 9:52 pm

    How do I run a parallel job on our cluster

    http://www.maths.liv.ac.uk/TheorPhys/FAQ/answers/mpi.html

  71. Anonymous said, on March 12, 2009 at 10:20 pm

    Job control
    https://wiki.ace-net.ca/index.php/Job_control

  72. Anonymous said, on March 13, 2009 at 3:37 pm

    Screen の使い方

    http://www.proton.jp/apps/screen.html#Anchor-detach
    escape ^Tt

  73. Anonymous said, on March 14, 2009 at 12:19 pm

    Screen setting

    http://d.hatena.ne.jp/swirhen/20081210/p1

  74. Anonymous said, on March 14, 2009 at 12:54 pm

    Screen setting

    http://masaoo.blogspot.com/2009/01/gnu-screen.html

  75. Anonymous said, on March 14, 2009 at 4:01 pm

    screen turn off color in ls

    alias ls=’ls –color=none’

    http://sourceforge.jp/magazine/06/09/11/088249

  76. Anonymous said, on March 14, 2009 at 4:05 pm

    screenのススメ

    http://www.dekaino.net/screen/

  77. Anonymous said, on March 14, 2009 at 5:13 pm

    rename は、指定したファイル名において from に最初にマッチする部分を to で置き換える。

    例えば、ファイル foo1, …, foo9, foo10, …, foo278 を与えると、

    rename foo foo0 foo?
    rename foo foo0 foo??

    というコマンドは、ファイル名を foo001, …, foo009, foo010, …, foo278 に変換する。

    そして、

    rename .htm .html *.htm

    というコマンドは、html ファイルの拡張子を修正する。

  78. Anonymous said, on March 14, 2009 at 9:36 pm

    Remap the key on XP

    http://www.usnetizen.com/fix_capslock.php#figure1

  79. Anonymous said, on March 14, 2009 at 10:57 pm

    PuTTY + screen + Vim + マウスが便利すぎるキャプチャ

    http://pocari.org/demo/vim-mouse/vim-mouse.html

  80. Anonymous said, on March 14, 2009 at 11:33 pm

    Color scheme

    http://nanasi.jp/old/colorscheme_0.html

  81. Anonymous said, on March 14, 2009 at 11:39 pm

    異なる vim プロセスで yank/paste するプラグイン

    http://d.hatena.ne.jp/secondlife/20060705/1152110844

  82. Anonymous said, on March 15, 2009 at 1:29 am

    vim setting

    http://www.vim.org/scripts/script.php?script_id=760

  83. Anonymous said, on March 16, 2009 at 10:14 pm

    - Not important, not urgent – drop
    - Important but not urgent – delay
    - Not important but urgent – delegate
    - Important and urgent – do.

    http://www.time-management-tips-techniques.info/organizing_and_time_management.html

    Setting Priorities

    When you have to choose among several tasks, there are several prioritization tools you can use. I summarize key ones below. If you decide to use one of them as your primary prioritization tool, I recommend that you still keep the others in mind. It can be very helpful at times to break out of your routine way of looking at things and to use a tool that you don’t use all of the time.

    Covey’s Quadrants

    Steven Covey describes a high-level prioritization scheme in his book The Seven Habits of Highly Effective People. In this scheme, tasks are categorized by four quadrants:

    QI – Important and Urgent
    QII – Important but Not Urgent
    QIII – Not Important but Urgent
    QIV – Not Important and Not Urgent
    Dr. Covey notes that highly effective people make time for the QII activities, and that doing so can reduce the time spent in other quadrants. While QI – QIV prioritization doesn’t help you decide which QI activity to do first and which to do second, and so on, it can be very enlightening to find out which quadrants your tasks are in.

    Paired Comparison

    This method uses a simple scoring system for comparing activities. The following example illustrates how to apply this method.

    Here is the list of example tasks:

    1. Call wife about dinner plans
    2. Fire Billy Bob
    3. Draft budget report
    4. Respond to e-mails

    Compare the following and put a check mark against the winner of each comparison:

    1 to 2, 1 to 3, 1 to 4
    2 to 3, 2 to 4
    3 to 4
    Let’s say the result of this is as follows:

    1. Call wife about dinner plans XX
    2. Fire Billy Bob XXX
    3. Draft budget report X
    4. Respond to e-mails

    So, the order you would do the tasks in would be 2, 1, 3, 4.

    The ABC Method

    I first became aware of this scheme when I used a paper-based Franklin planner.

    It ranks tasks into three categories:

    A = vital
    B = important
    C = nice
    Then it subdivides tasks in these categories into A1, A2, A3, …, B1, B2, … and so forth.

    A lot of people find this prioritization method to be very helpful.

    The Payoff versus Time Method

    With this method, you weight each task by the payoff you expect from it versus the time it takes to do it. Tasks that have high payoff and that take little time are the ones you would do first. Correspondingly, tasks that have low payoff and that take a lot of time are ones you would do last or not at all.

    recode -s utf-8..utf-16 /dev/null

    How about trying iconv? If it is not intended encoding, it errors.

    For example, if

    iconv -f UTF-8 -t ISO-8859-1 <somefile

    succeeds, it means the file is UTF-8. Thus, I wrote the following script:

    #!/bin/sh
    if iconv -f UTF-8 -t UTF-8 /dev/null
    then
    echo UTF-8
    else
    echo ISO-8859-1
    fi

    http://developers.sun.com/global/technology/standards/reference/faqs/determining-file-encoding.html

  84. Anonymous said, on March 19, 2009 at 2:18 am

    log file

    http://en.wikibooks.org/wiki/C%2B%2B_Programming/RAII

  85. Anonymous said, on March 27, 2009 at 12:58 am

    #!/bin/bash
    # rfe.sh: Renaming file extensions.
    #
    # rfe old_extension new_extension
    #
    # Example:
    # To rename all *.gif files in working directory to *.jpg,
    # rfe gif jpg

    E_BADARGS=65

    case $# in
    0|1) # The vertical bar means “or” in this context.
    echo “Usage: `basename $0` old_file_suffix new_file_suffix”
    exit $E_BADARGS # If 0 or 1 arg, then bail out.
    ;;
    esac

    for filename in *.$1
    # Traverse list of files ending with 1st argument.
    do
    mv $filename ${filename%$1}$2
    # Strip off part of filename matching 1st argument,
    #+ then append 2nd argument.
    done

    exit 0

  86. Anonymous said, on March 31, 2009 at 11:01 am

    Vi —> Switch and shell commands

    Q | ^\ | | Switch from vi to `ex’.
    : | An `ex’ command can be given.
    :vi | Switch from `ex’ to vi.
    :sh | Execute a subshell, back to vi by `^D’.
    :[x,y]! | Execute a shell [on lines x through y;
    | these lines will serve as input for and
    | will be replaced by its standard output].
    :[x,y]!! [] | Repeat last shell command [and append ].
    :[x,y]! ! [] | Use the previous command (the second `!’) in a
    | new command.
    [*]! | The shell executes , with as standard
    | input the lines described by ,
    | next the standard output replaces those lines
    | (think of `cb’, `sort’, `nroff’, etc.).
    [*]!! | Append to the last and execute it,
    | using the lines described by the current
    | .
    [*]!! | Give lines as standard input to the
    | shell , next let the standard output
    | replace those lines.
    [*]!!! [] | Use the previous [and append to it].
    :x,y w ! | Let lines x to y be standard input for
    | (notice the between the `w’ and the `!’).
    :r! | Put the output of onto a new line.
    :r | Read the file into the buffer.

  87. Anonymous said, on March 31, 2009 at 11:03 am

    bash: formatting a variable

    > how can produce the string
    > “luciano_002″ ?

    filename=`printf “%s_%03d” luciano 2`

    Or:

    ext=000$val
    filename=luciano_${ext#${ext%???}}

  88. Anonymous said, on March 31, 2009 at 12:49 pm

    copy and rename list of files

    $ cd /dirA
    $ ls -1 *.TXT
    RPT.102.666.TXT
    RPT101.555.TXT
    $ cat > rename.ksh
    #!/bin/ksh

    ls *.TXT | while read file
    do
    cp “$file” /dirB/${file%.*}.`date ‘+%Y%m%d%H%M%S’`.TXT
    done
    ^D
    $ chmod +x ./rename.ksh
    $ ./rename.ksh
    $ ls -1 /dirB/*.TXT
    RPT.102.666.20050226024347.TXT
    RPT101.555.20050226024347.TXT

  89. Anonymous said, on April 1, 2009 at 10:46 am

    http://nylander.wordpress.com/tag/pov-ray/page/6/

  90. Anonymous said, on April 1, 2009 at 10:54 am

    The finite difference method (FDM) is an alternative way of approximating solutions of PDEs. The differences between FEM and FDM are:

    * The finite difference method is an approximation to the differential equation; the finite element method is an approximation to its solution.

    * The most attractive feature of the FEM is its ability to handle complicated geometries (and boundaries) with relative ease. While FDM in its basic form is restricted to handle rectangular shapes and simple alterations thereof, the handling of geometries in FEM is theoretically straightforward.

    * The most attractive feature of finite differences is that it can be very easy to implement.

    * There are several ways one could consider the FDM a special case of the FEM approach. One might choose basis functions as either piecewise constant functions or Dirac delta functions. In both approaches, the approximations are defined on the entire domain, but need not be continuous. Alternatively, one might define the function on a discrete domain, with the result that the continuous differential operator no longer makes sense, however this approach is not FEM.

    * There are reasons to consider the mathematical foundation of the finite element approximation more sound, for instance, because the quality of the approximation between grid points is poor in FDM.

    * The quality of a FEM approximation is often higher than in the corresponding FDM approach, but this is extremely problem dependent and several examples to the contrary can be provided.

    Generally, FEM is the method of choice in all types of analysis in structural mechanics (i.e. solving for deformation and stresses in solid bodies or dynamics of structures) while computational fluid dynamics (CFD) tends to use FDM or other methods like finite volume method (FVM). CFD problems usually require discretization of the problem into a large number of cells/gridpoints (millions and more), therefore cost of the solution favors simpler, lower order approximation within each cell. This is especially true for ‘external flow’ problems, like air flow around the car or airplane, or weather simulation in a large area.

  91. Anonymous said, on April 1, 2009 at 11:04 am
    /* Calculate the bounds */
       for (i=0;i&lt;nx;i++) {
          for (j=0;j&lt;ny;j++) {
             for (k=0;k&lt;nz;k++) {
                themax = MAX(themax,df3[i][j][k]);
                themin = MIN(themin,df3[i][j][k]);
             }
          }
       }
    
  92. Anonymous said, on April 2, 2009 at 12:18 pm

    # 文字列の代入

    test=”Hellow world!!”

    # 整数の計算*5

    * 足し算

    num=1
    num=`expr $num + 1`

    * 掛け算*6

    num=`expr $num \* 3`

    # 小数点

    num=`echo “scale:3; $num / 0.3″ | bc`
    num=`echo “scale:5; sqrt(2)” | bc -l`

    http://silkychild.ddo.jp/pwiki/index.php?Linux%2Fshell%20script

  93. Anonymous said, on April 2, 2009 at 6:19 pm

    rainbow
    http://www.weatherquestions.com/rainbow.jpg

  94. Anonymous said, on April 2, 2009 at 8:18 pm
    #!/bin/sh
    for i in *.bmp
    do
      convert $i ${i%.bmp}.jpg
    done
    
  95. Anonymous said, on April 2, 2009 at 11:14 pm

    How to be a Programmer: A Short, Comprehensive, and Personal Summary

    http://samizdat.mines.edu/howto/HowToBeAProgrammer.html

  96. Anonymous said, on April 2, 2009 at 11:49 pm

    Rainbow Formation

    http://www.physicsclassroom.com/Class/refrn/u14l4b.cfm

  97. Anonymous said, on April 2, 2009 at 11:57 pm

    Secondary rainbow

    http://eo.ucar.edu/rainbows/rnbw7.gif

  98. Anonymous said, on April 3, 2009 at 11:36 am

    Povray 視点 視線

    http://www.ne.jp/asahi/nishimura/takashi/povray/3.5jp/povdoc_220.htm

  99. Anonymous said, on April 3, 2009 at 1:32 pm

    Unix tip

    http://hydro.iis.u-tokyo.ac.jp/~agata/archive/Unix_Tips/

  100. Anonymous said, on April 3, 2009 at 1:42 pm

    http://www.craft-inc.net/tech/unix_linux_tips.html

  101. Anonymous said, on April 3, 2009 at 1:57 pm

    $ cat test.txt
    ————————————-
    1行目

    2行目

    3行目
    ————————————-

    $ sed ‘/^$/d’ test.txt
    ————————————-
    1行目
    2行目
    3行目
    ————————————-

  102. Anonymous said, on April 4, 2009 at 12:50 am

    INTRODUCTION TO EXCEPTION HANDLING PART

    http://www.glenmccl.com/eh_cmp.htm

  103. Anonymous said, on April 4, 2009 at 2:17 pm

    Magic Linux

    http://blog.modeelf.com/

  104. Anonymous said, on April 8, 2009 at 2:18 pm

    Also “echo -n” will echo something without the newline:
    Code:

    $ echo -n foo > test
    $ echo bar >> test
    $ cat test
    foobar

  105. Anonymous said, on April 10, 2009 at 7:18 pm

    Povray Media

    http://www.arch.oita-u.ac.jp/povjp/povjp/html/pov35ref_media.html

  106. Anonymous said, on April 10, 2009 at 7:58 pm

    Povray

    http://web.mit.edu/povray_v3.6.1/reference-us.pdf

  107. Anonymous said, on April 14, 2009 at 6:54 pm

    Cloud

    http://www.f-lohmueller.de/pov_tut/interior/interior_70e.htm

  108. Anonymous said, on April 15, 2009 at 11:18 pm

    Povray Analysis Geometry

    http://www.f-lohmueller.de/index.htm

  109. Anonymous said, on April 18, 2009 at 10:25 pm

    python

    Python for Bash scripters: A well-kept secret

  110. Anonymous said, on April 18, 2009 at 10:26 pm

    Python for Bash scripters: A well-kept secret

    http://magazine.redhat.com/2008/02/07/python-for-bash-scripters-a-well-kept-secret/

  111. Anonymous said, on April 20, 2009 at 11:16 am

    RGB colors as a function of wavelength for visible light

    http://www.efg2.com/Lab/ScienceAndEngineering/Spectra.htm

  112. Anonymous said, on May 8, 2009 at 6:41 pm

    povray Light Fading

    http://nishimulabo.edhs.ynu.ac.jp/~povray/3.5jp/povdoc_241.htm

  113. Anonymous said, on May 10, 2009 at 5:43 pm

    Subversion

    http://unfuddle.com/

  114. Anonymous said, on May 11, 2009 at 1:37 am

    Cuda simple program
    http://llpanorama.wordpress.com/2008/05/21/my-first-cuda-program/

  115. Anonymous said, on May 14, 2009 at 12:41 pm

    動画の編集

    http://jumper-x.hp.infoseek.co.jp/begin/

  116. Anonymous said, on May 15, 2009 at 3:27 pm

    Putty

    http://www.kuins.kyoto-u.ac.jp/news/47/putty-gen.html

  117. Anonymous said, on May 20, 2009 at 9:31 pm

    euler angles
    http://local.wasp.uwa.edu.au/~pbourke/geometry/eulerangle/

  118. Anonymous said, on May 22, 2009 at 4:29 pm

    Ready-Made Colors of Povray

    http://www.f-lohmueller.de/pov_tut/tex/tex_150e.htm

  119. Anonymous said, on May 28, 2009 at 6:55 pm

    SVN

    svn+ssh://name@192.168.1.71/home/svn/repos/HPC_QSG

  120. Anonymous said, on May 30, 2009 at 7:15 am

    Tips: Vim(gVim)での文字化け解消

    $ printenv | grep LANG
    もし”LANG=ja_JP.eucJP”と表示されればシステムエンコードはEUC-JPです。

     このシステムエンコードを利用して、vim(gvim)の設定ファイル[~/.vimrc(~/.gvimrc)]に以下を追加します。

    set encoding=euc-jp
    set fileencodings=iso-2022-jp,sjis,utf8

    以上で日本語のファイルも正常に読み込むことが出来るようになります。
    もしシステムエンコードがEUC-JPでなければ、適宜encodingとfileencodingsの値を変更してください。

  121. Anonymous said, on May 30, 2009 at 7:22 am

    vim 文字コードの自動認識

    http://www.kawaz.jp/pukiwiki/?vim

  122. Anonymous said, on May 30, 2009 at 12:39 pm

    Example syntax for Secure Copy (scp)
    What is Secure Copy?

    scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.
    Examples
    Copy the file “foobar.txt” from a remote host to the local host

    $ scp your_username@remotehost.edu:foobar.txt /some/local/directory

    Copy the file “foobar.txt” from the local host to a remote host

    $ scp foobar.txt your_username@remotehost.edu:/some/remote/directory

    Copy the directory “foo” from the local host to a remote host’s directory “bar”

    $ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar

    Copy the file “foobar.txt” from remote host “rh1.edu” to remote host “rh2.edu”

    $ scp your_username@rh1.edu:/some/remote/directory/foobar.txt \
    your_username@rh2.edu:/some/remote/directory/

    Copying the files “foo.txt” and “bar.txt” from the local host to your home directory on the remote host

    $ scp foo.txt bar.txt your_username@remotehost.edu:~

    Copy multiple files from the remote host to your current directory on the local host

    $ scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .

    $ scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .

    scp Performance

    By default scp uses the Triple-DES cipher to encrypt the data being sent. Using the Blowfish cipher has been shown to increase speed. This can be done by using option -c blowfish in the command line.

    $ scp -c blowfish some_file your_username@remotehost.edu:~

    It is often suggested that the -C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. Otherwise it may just be adding extra burden to the CPU. An example of using blowfish and compression:

    $ scp -c blowfish -C local_file your_username@remotehost.edu:~

  123. Anonymous said, on May 30, 2009 at 7:55 pm

    CentOSにEmacsのインストール

    yum install anthy-el

    ctl-\で日本語モ-ド

    1. vi /home/ユーザ名/.emacs
    2. ; 日本語をデフォルトにする。
    3. (set-language-environment “Japanese”)
    4. ; anthy.el をロードできるようにする (必要に応じて)。
    5. (push “/usr/local/share/emacs/site-lisp/anthy/” load-path)
    6. ; anthy.el をロードする。
    7. (load-library “anthy”)
    8. ; japanese-anthy をデフォルトの input-method にする。
    9. (setq default-input-method “japanese-anthy”))

  124. Anonymous said, on May 30, 2009 at 8:04 pm

    Copying file to host:

    scp SourceFile user@host:directory/TargetFile

    Copying file from host:

    scp user@host:directory/SourceFile TargetFile

  125. Anonymous said, on May 30, 2009 at 8:19 pm

    find . -name ‘*.rb’ | xargs nkf –overwrite -w;
    find . -name ‘*.css’ | xargs nkf –overwrite -w;

  126. Anonymous said, on June 5, 2009 at 9:40 am

    CentOS Network setting

    http://www.obenri.com/_minset_cent5/netconfig_cent5.html

  127. Anonymous said, on June 5, 2009 at 9:41 am

    find . -name ‘*.rb’ | xargs nkf –overwrite -w;
    find . -name ‘*.css’ | xargs nkf –overwrite -w;
    find . -name ‘*.conf’ | xargs nkf –overwrite -w;
    find . -name ‘*.cgi’ | xargs nkf –overwrite -w;
    find . -name ‘*.html’ | xargs nkf –overwrite -w;
    find . -name ‘*.rhtml’ | xargs nkf –overwrite -w;

  128. Anonymous said, on June 5, 2009 at 9:44 am

    Vim tips

    http://www15.ocn.ne.jp/~tusr/vim/vim_text2.html#mozTocId288152

  129. Anonymous said, on June 5, 2009 at 6:32 pm

    Make file

    http://www.hakodate-ct.ac.jp/~tokai/tokai/gtkmm/etc/p1.htm

  130. Anonymous said, on June 6, 2009 at 9:54 am

    linux debug

    http://www.ibm.com/developerworks/jp/linux/library/l-debug/

  131. Anonymous said, on June 6, 2009 at 10:40 pm

    make

    http://www.applistar.com/technologies/7/

  132. Anonymous said, on June 7, 2009 at 7:35 am

    HostMonsterに分散管理システムMercuryをインストール

  133. Anonymous said, on June 7, 2009 at 7:35 am

    http://b.ruyaka.com/tag/mercury/

  134. Anonymous said, on June 9, 2009 at 6:11 pm

    OBJS = MovieList.o Movie.o NameList.o Name.o Iterator.o
    CC = g++
    DEBUG = -g
    CFLAGS = -Wall -c $(DEBUG)
    LFLAGS = -Wall $(DEBUG)

    p1 : $(OBJS)
    $(CC) $(LFLAGS) $(OBJS) -o p1

    MovieList.o : MovieList.h MovieList.cpp Movie.h NameList.h Name.h Iterator.h
    $(CC) $(CFLAGS) MovieList.cpp

    Movie.o : Movie.h Movie.cpp NameList.h Name.h
    $(CC) $(CFLAGS) Movie.cpp

    NameList.o : NameList.h NameList.cpp Name.h
    $(CC) $(CFLAGS) NameList.cpp

    Name.o : Name.h Name.cpp
    $(CC) $(CFLAGS) Name.cpp

    Iterator.o : Iterator.h Iterator.cpp MovieList.h
    $(CC) $(CFLAGS) Iterator.cpp

    clean:
    \rm *.o *~ p1

    tar:
    tar cfv p1.tar Movie.h Movie.cpp Name.h Name.cpp NameList.h \
    NameList.cpp Iterator.cpp Iterator.h

  135. Anonymous said, on June 13, 2009 at 11:45 am

    Subversion URLの説明

    http://www-aos.eps.s.u-tokyo.ac.jp/~takagi/SubversionMemo.html

  136. Anonymous said, on June 13, 2009 at 6:28 pm

    shell tips

    files=$(ls -1 | grep .c)
    for x in $files
    do
    mv $x $x’pp’
    done

  137. Anonymous said, on June 15, 2009 at 12:38 am

    Trong terminal ( Applications -> Accessories -> Terminal ) gõ sudo gedit /etc/apt/sources.list
    - Cửa sổ hiện ra, chèn # trước mirror không cần thiết, và bỏ # đi trước các mirror sẽ dùng.

    wget http://scim-unikey.googlecode.com/files/scim-unikey_0.2.0%7E20090417-1ubuntu0%7Ejaunty_i386.deb

    sudo dpkg -i scim-unikey_0.2.0~20090417-1ubuntu0~jaunty_i386.deb

    http://saylinux.wordpress.com/2007/12/04/cai-dat-stardict/

    NMAP = Network Exploration Tool And Security Scanner (Network mapper)

    http://nmap.org/download.html

  138. Anonymous said, on June 15, 2009 at 12:46 am

    http://vietmatrix.wordpress.com

  139. Anonymous said, on June 18, 2009 at 11:06 am

    PC cluster

    http://www.phys.aoyama.ac.jp/~truego/03.html

  140. Anonymous said, on June 21, 2009 at 10:56 pm

    vim operator

    y: 今開いてるページのアドレスをコピーします。

    p: コピーしたアドレスを開きます。

    u: 閉じたタブを開きなおします。

  141. Anonymous said, on June 21, 2009 at 11:08 pm

    In vi and vim, if you want to save and exit with a simple key stroke simply use:
    :x

    2. Copy/Paste the block of text in vi or vim

    A. Mark the location of the first character of the block of text you want to copy by pressing:

    mx

    this marks the begining of the text to be copied into a buffer ‘x’.

    B. Move the cursor over the last character of the block of text you want to copy and press:

    (shift)+x

    By pressing shift you are moving all the characters from mark to the current position into a buffer.

    C. To copy (or, in vi lingo, to yank the buffered text)
    press

    y’x

    This will yank everything from the buffer x.
    (‘tick’ character ‘ is command in vi to read from the named buffer)

    D. Now move the cursor above the location where you want to paste the yanked text and press:

    p

    p (for paste) will insert the copied (yanked) text at the line below the cursor.

    :vsp filename vertical split

    vim o file1 file2 open 2 files in two windows (horizontal)
    vim O file1 file2 (vertical)

  142. Anonymous said, on June 23, 2009 at 4:56 pm

    povray

    Chirstoph

    http://www.imagico.de/pov/earth_simple_free.pov

  143. Anonymous said, on June 24, 2009 at 9:22 pm

    building MPI pc cluster

    http://na-inet.jp/na/vine32_mpicluster/index.html

  144. Anonymous said, on June 29, 2009 at 12:08 pm

    CUDA

    grid 2 dimensions

    block 3 dimensions

    maximum thread 512 —> 256 better

    deviceemu -D_DEVICE …… —> print

  145. Anonymous said, on June 29, 2009 at 9:40 pm

    PC cluster setting
    http://tcslab.csce.kyushu-u.ac.jp/old-users/isibashi/Pvm/manual.html

  146. Anonymous said, on July 7, 2009 at 2:05 pm

    Vim: turn off the search highlighting

    type

    “:nohls”

    it will turn off the search highlighting.

    (The next time you do a search, it will be highlighted, this is not a permanent setting. It is useful for turning off the highlighting for the current search.)

  147. Anonymous said, on July 8, 2009 at 11:07 am

    Mount

    Under Linux, it is possible to access MS-DOS partitions by mounting them in the Unix file system.
    To mount the partition /dev/hda1, it is sufficient to type:

    %mount -t msdos /dev/hda1 /mnt/hd

    Do not forget to unmount the partition

    %umount /mnt/cdrom

    Alias
    Instead of typing the command:

    “mount -t iso9660 /dev/cdrom /mnt/cdrom”

    it is therefore sufficient to type in:

    alias cdrom=’mount -t iso9660 /dev/cdrom /mnt/cdrom’

    it is therefore sufficient to type in “cdrom” to mount this peripheral device.

    However, if you ask: Why should I type in this command if I have to declare it every time that I reinitialize the system?

    It is actually sufficient to edit the file “/etc/bashrc” and add the following line:
    alias cdrom=’mount -t iso9660 /dev/cdrom /mnt/cdrom’

  148. Anonymous said, on July 8, 2009 at 11:15 am

    エイリアスを解除するには unalias

    $ unalias df

    完全に解除するのではなく、一時だけ無効にしたい場合はコマンドの前に \ を置く

    $ \df

    df を実行したら -h -T オプションが自動的に付く
    $ alias df=”df -h -T”

  149. Anonymous said, on July 11, 2009 at 4:04 pm

    alias = scpxxx=”/home/viet/scpxxx”

    scpxxx
    #!/bin/bash
    scp $1 usid@192.168.x.xxx:/home/usid/Desktop

  150. Anonymous said, on July 11, 2009 at 5:39 pm

    get time

    http://kzk9.net/column/time.html

  151. Anonymous said, on July 14, 2009 at 10:13 am

    http://item.rakuten.co.jp/e-living/v-lo-120-s/

  152. Anonymous said, on July 18, 2009 at 12:14 pm

    数値積分プログラムの並列実行

    http://pepper.is.sci.toho-u.ac.jp/index.php?%A5%CE%A1%BC%A5%C8%2FCUDA%2F%BF%F4%C3%CD%C0%D1%CA%AC

  153. Anonymous said, on July 22, 2009 at 2:11 pm

    Open MPで piを計算する

    http://d.hatena.ne.jp/mscp/20081007/1223352481

  154. Anonymous said, on July 23, 2009 at 4:47 pm

    Linux ネットワークの設定

    http://www.ysd.bne.jp/linux/network.html

  155. Anonymous said, on July 23, 2009 at 6:17 pm

    sshのセッション切れ

    http://lists.debian.or.jp/debian-users/200710/msg00050.html

  156. Anonymous said, on July 24, 2009 at 11:40 am

    Package managers

    http://wiki.openvz.org/Package_managers

  157. Anonymous said, on August 1, 2009 at 11:58 am

    ifconfig

    http://www.atmarkit.co.jp/fnetwork/netcom/ifconfig/ifconfig.html

  158. Anonymous said, on August 25, 2009 at 1:57 pm

    Povray Cacks

  159. Anonymous said, on August 29, 2009 at 11:02 am

    bash Tips

  160. Anonymous said, on August 29, 2009 at 11:04 am

    検査 keyword

    Super Technique 講座
    bash 超プログラム術

  161. Anonymous said, on August 29, 2009 at 2:42 pm

    Remove a user from a group

    Removing a user from a group is a bit trickier. Unfortunately, there is no direct command, at least not in Fedora or RHEL, that can do that from command line. At first you need to get a list of groups that your user is a member of:

    # id -nG username
    group1 group2 group3 ….

    Then you need to put all these groups as a comma-separated list to the usermod -G option, except for the group from which you want the user to be removed. So, to remove the user from group2, issue the command:

    # usermod -G group1,group3,… username

  162. Anonymous said, on August 29, 2009 at 2:44 pm

    SVN Admin

    http://www.linuxfromscratch.org/blfs/view/svn/server/svnserver.html

  163. Anonymous said, on August 29, 2009 at 3:38 pm

    chown -R svn:svntest /srv/svn/repositories/svntest &&
    chmod -R g+w /srv/svn/repositories/svntest &&
    chmod g+s /srv/svn/repositories/svntest/db &&
    usermod -G svn,svntest -a

    svntest is the group assigned to the svntest repository. As mentioned earlier, this eases administration of multiple repositories when using OpenSSH for authentication. Going forward, you’ll need to add your unprivileged user, and any additional users that you wish to have write access to the repository, to the svn and svntest groups.

    In addition, you’ll notice that the new repository’s db directory is set-groupID. If the reasoning is not immediately obvious, when using any external authentication method (such as ssh), the sticky bit is set so that all new files will be owned by the user, but group of svntest. Anyone in the svntest group can create files, but still give the entire group write access to those files. This avoids locking out other users from the repository.

  164. Anonymous said, on August 29, 2009 at 6:42 pm

    What does txn-current-lock do

    http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2384467

    Jim the Standing Bear wrote:
    > Hello,
    >
    > What does txn-current-lock do? The name suggests that is a lock for
    > txn-current, but in my situation, the owner of txn-current-lock is
    > different than that of txn-current. Is this normal? Thanks.

    txn-current-lock is a file that svn locks on to make modifications to
    txn-current. Since txn-current-lock is only created once and then used for
    locking, if you have different users committing to the repository, then the two
    owners can be different.

    Look for more info here:

    http://svn.collab.ne​t/repos/svn/trunk/su​bversion/libsvn_fs_f​s/structure

    BTW, if you have two or more people committing into the same repository using
    file://, you really should set up an Apache or svnserve server instead.

    Regards,
    Blair

  165. Anonymous said, on August 29, 2009 at 6:43 pm

    What does txn-current-lock do

    http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2384467

  166. Anonymous said, on September 1, 2009 at 2:51 pm

    Very useful dictionary

    http://www.dictjuggler.net/

  167. Anonymous said, on September 1, 2009 at 3:08 pm

    Supporting Multiple Repository Access Methods

    Once you’ve jumped through these hoops, your repository should be accessible by all the necessary processes. It may seem a bit messy and complicated, but the problems of having multiple users sharing write-access to common files are classic ones that are not often elegantly solved.

  168. Anonymous said, on September 1, 2009 at 4:51 pm

    http://stackoverflow.com/questions/96597/how-do-i-upgrade-to-subversion-1-5-on-centos-5

    To keep subversion up to date, you have to remember to run

    yum –enablerepo=rpmforge update subversion

    from time to time.

  169. Anonymous said, on September 8, 2009 at 4:53 pm

    SVN setting

    http://www.gside.org/Gentoo/subversion/subversion2.html

  170. Anonymous said, on September 8, 2009 at 4:56 pm

    SVN settings

    Subversionのインストールと設定(svnserve編)

  171. Anonymous said, on September 9, 2009 at 10:05 am

    Emacs Org

    Using dates and times in Emacs org-mode

  172. Anonymous said, on September 9, 2009 at 12:10 pm

    emacs org mode tutorial

    http://www.linuxjournal.com/article/9116

  173. Anonymous said, on September 10, 2009 at 9:57 am

    How To Get System Info In Linux

    http://www.computerbob.com/guests/how_to_get_system_info_in_linux.php

  174. Anonymous said, on September 12, 2009 at 6:10 pm

    http://www.multicoreinfo.com/2009/07/parprog-part-8

  175. Anonymous said, on September 12, 2009 at 6:36 pm

    PGI

    http://www.clustermonkey.net//content/view/248/33/1/0/

  176. Anonymous said, on September 12, 2009 at 6:39 pm

    http://www.clustermonkey.net//content/view/248/33/1/0/

  177. Anonymous said, on September 18, 2009 at 6:26 pm

    ※C++を使うには、cuda.rulesの中の「CommandLine=…」の部分に
    「–host-compilation=C++」のオプションを追加する。

    OpenMPを使う場合は、「-Xcompiler /openmp」を追加し、
    ランタイムを/MTd、/MT等にするとよさそう。

  178. Anonymous said, on September 30, 2009 at 1:34 am

    Is there a max array length limit in c++
    http://stackoverflow.com/questions/216259/is-there-a-max-array-length-limit-in-c

  179. Anonymous said, on September 30, 2009 at 1:45 am

    メモリーおよびアドレス空間の限界値

    http://www.geocities.jp/hpt_user99/address.html#pae_4gt

  180. Anonymous said, on September 30, 2009 at 2:10 am

    OutOfMemoryException

    http://www.guylangston.net/blog/Article/MaxMemory

  181. Anonymous said, on September 30, 2009 at 11:27 am

    CUDA project setting

    http://forums.nvidia.com/index.php?showtopic=101931

  182. Anonymous said, on September 30, 2009 at 11:28 am

    Visual Studio 2008 and CUDA

    http://www.cask.cc/wp/archives/59

    http://www.bv2.co.uk/?p=730

  183. Anonymous said, on October 4, 2009 at 4:30 am

    network camera

    http://www.dlink.com/products/?pid=295

  184. Anonymous said, on October 6, 2009 at 4:29 pm

    OpenGL Transformation

    http://www.songho.ca/opengl/gl_transform.html

  185. Anonymous said, on October 7, 2009 at 8:13 am

    openGL

    http://www.videotutorialsrock.com/index.php

  186. Anonymous said, on October 9, 2009 at 12:03 pm

    network check port

    http://www.cman.jp/network/support/

  187. Anonymous said, on October 9, 2009 at 12:51 pm

    Change the SSH port
    Running SSHD on an alternate port and connecting to the service

    $ vi /etc/ssh/sshd_config

    #Port 22 —–> Port 22222

    $ service sshd reload

    $ ssh username@myhostnaname.com -p 22222

  188. Anonymous said, on October 9, 2009 at 3:51 pm

    C++ file read write getline

    http://www.cplusplus.com/doc/tutorial/files/

  189. Anonymous said, on October 9, 2009 at 3:59 pm

    標準C++文字列
    http://next1.cc.it-hiroshima.ac.jp/CPPPUBLISH/node10.html

  190. Anonymous said, on October 23, 2009 at 11:38 pm

    iPhoneを安く月額最低額で使う方法

    http://jb26.cocolog-nifty.com/blog/2008/08/b_3g_6e06.html

  191. Anonymous said, on October 24, 2009 at 3:32 pm

    Screen setting
    http://ubuntuforums.org/archive/index.php/t-216747.html

  192. Anonymous said, on October 25, 2009 at 9:40 am

    自己研鑽に余念がなく、勉強したことを元にビジネスを立ち上げた著者による、長期投資ならぬ長期勉強法が書かれた本。

    ・1日30分も勉強に使えない人は勉強したくない人
    ・勉強したい時がチャンス
    ・本は一冊づつ購入し、購入した日に読み始める
    ・本は読みたいと思ったら即購入
    ・本は消耗品
    ・記憶は繰り返しインプットしないと長期記憶化しない
    ・勉強の成果に1番必要な要素は時間
    ・勉強の成果はすぐに出ないので諦めない
    ・全体の20%が自己投資を惜しまないタイプで、この中だけで競争が行われる
    ・自己投資をすれば必ず数年後にリターンとして反ってくる
    ・テレビを見ない
    ・仕事の処理時間を先に決めて、仕事を早くこなす
    ・カフェ、電車を利用する
    ・歩いている時はiPod
    ・気持ちいい状態を作って勉強する
    ・集中→休憩のサイクルを短くする
    ・休憩中は別のインプットをする
    ・勉強に飽きたら場所を変える
    ・少ないくらいの勉強量で毎日続ける
    ・英会話はフレーズ丸暗記
    ・リスニングはフレーズ暗記+発音の訓練
    ・自分で発音できない音は気聞き取れない
    ・リーディングは二時間ひたすら英字新聞
    ・ライティングは英文を書いて添削してもらう
    ・先にゴールを決める、決断が1番大事
    ・目標を毎日読むことは自分の習慣を書き換える事
    ・食事は勉強の効率を下げる敵、よく噛んで腹八分にする
    ・7時間は寝る必要がある
    ・アーロンチェアフルセットがオススメ

  193. Anonymous said, on October 26, 2009 at 9:57 am

    Sambaの設定

    http://shikichi.ddo.jp/samba.html

  194. Anonymous said, on October 28, 2009 at 2:15 pm

    nvidia-settings

    DISPLAY=:0.0 nvidia-settings -q [gpu:0]/GPUCoreTemp -q [gpu:1]/GPUCoreTemp | grep “Attribute” | sed -e “s/.*: //g” -e “s/\.//g”

    DISPLAY=:0.0 (if you are runing from remote computer)
    nvidia-settings -q (do a query, more in nvidia-settings –help)
    [gpu:0]/GPUCoreTemp (the query, thats mean that give information about attribute GPUCoreTemp from the first gpu
    -q [gpu:1]/GPUCoreTemp (needed if you have 2 graphs anda want to know the temp of second tongue.gif )
    | grep “Attribute” (filter for output for only shows the lines having Attribute in it)
    | sed -e “s/.*: //g” -e “s/\.//g” (a litle replaces for only shows the temp)

    http://forums.nvidia.com/index.php?showtopic=16360&pid=461820&mode=threaded&start=#entry461820

  195. Anonymous said, on October 30, 2009 at 10:55 am

    温度

    http://d.hatena.ne.jp/ichikaway/20090217/1234877845

  196. Anonymous said, on October 31, 2009 at 4:38 pm

    ubuntu emacs

    http://blog.as-is.net/2007/07/ubuntu-704-emacs-tex.html

  197. Anonymous said, on October 31, 2009 at 4:52 pm

    ubuntu C++

    sudo apt-get install build-essentia

  198. Anonymous said, on November 4, 2009 at 12:32 pm

    ZIP形式は、Windowsでよく使われる圧縮方式だ。特に、海外ではファイルをZIP形式で配布するケースが多い。

     LinuxでZIP形式のファイルを展開するにはunzipコマンドを使用する。例えば、foo.zipというファイルを展開するには以下のように行う。
    $ unzip foo.zip
    Archive: foo.zip
    inflating: xxxxx.yyy
    inflating: yyyyy.zzz
    (省略)

     また、ZIP形式に含まれるファイルの一覧を表示するには-lオプションを付けてunzipコマンドを実行する。
    $ unzip -l tmp.zip
    Archive: tmp.zip
    Length Date Time Name
    ——– —- —- —-
    1205839 06-13-01 23:30 010601.tif
    1147425 06-13-01 16:56 010602.tif
    1147425 06-13-01 16:59 010603.tif
    1106511 06-14-01 00:25 01060a.tif
    ——– ——-
    4607200 4 files

     ファイルを圧縮するときはzipコマンドを使用する。例えば、カレントディレクトリにある拡張子が.tifのファイルをtmp.zipというファイルに圧縮するには、以下のコマンドを実行する。
    $ zip tmp.zip *.tif
    adding: 010601.tif (deflated 76%)
    adding: 010602.tif (deflated 82%)
    adding: 010603.tif (deflated 91%)
    adding: 01060a.tif (deflated 88%)
    adding: lynx.tif (deflated 98%)

     すでに存在するZIP形式のファイルに新たにファイルを追加する場合も、同様にすればいい。例えば、上記で作成したtmp.zipに、カレントディレクトリにある拡張子が.txtのファイルを追加するには、以下のコマンドを実行する。
    $ zip tmp.zip *.txt
    adding: a.txt (stored 0%)
    adding: b.txt (stored 0%)
    adding: c.txt (stored 0%)
    adding: d.txt (deflated 47%)

     ZIP形式のファイルから特定のファイルを削除するには、-dオプションを使用する。例えばtmp.zipから拡張子が.txtのファイルを削除するには、以下のコマンドを実行する。
    $ zip tmp.zip -d *.txt
    deleting: a.txt
    deleting: b.txt
    deleting: c.txt
    deleting: d.txt

  199. Anonymous said, on November 5, 2009 at 7:08 am

    acroread install

    http://www.ubuntugeek.com/install-acrobat-reader-in-ubuntu-9-10-karmic.html

  200. Anonymous said, on November 5, 2009 at 7:58 pm

    http://www.tumblr.com/tagged/platex

  201. Anonymous said, on November 5, 2009 at 8:02 pm

    ebb

    http://www.ma.ns.musashi-tech.ac.jp/Pages/TeX/mediabb.sty.html

  202. Anonymous said, on November 5, 2009 at 8:21 pm

    convert eps

    http://www.nn.iij4u.or.jp/~tutimura/tex/dvipdfm.html

  203. Anonymous said, on November 5, 2009 at 10:32 pm

    scim anthy

    http://lector-note.org/modules/smartsection/item.php?itemid=43

  204. Anonymous said, on November 11, 2009 at 2:05 am

    centos latex dvipdfm
    http://www.compensator.net/memo/2009/08/02/tex.html

  205. Anonymous said, on November 11, 2009 at 6:53 pm

    Setup a Subversion Server in 4 Minutes
    http://www.tonyspencer.com/2007/03/02/setup-a-subversion-serv

  206. Anonymous said, on November 15, 2009 at 10:50 pm

    http://www.kawaz.jp/pukiwiki/?vim#content_1_7

    ” 文字コードの自動認識
    if &encoding !=# ‘utf-8′
    set encoding=japan
    set fileencoding=japan
    endif
    if has(‘iconv’)
    let s:enc_euc = ‘euc-jp’
    let s:enc_jis = ‘iso-2022-jp’
    ” iconvがeucJP-msに対応しているかをチェック
    if iconv(“\x87\x64\x87\x6a”, ‘cp932′, ‘eucjp-ms’) ==# “\xad\xc5\xad\xcb”
    let s:enc_euc = ‘eucjp-ms’
    let s:enc_jis = ‘iso-2022-jp-3′
    ” iconvがJISX0213に対応しているかをチェック
    elseif iconv(“\x87\x64\x87\x6a”, ‘cp932′, ‘euc-jisx0213′) ==# “\xad\xc5\xad\xcb”
    let s:enc_euc = ‘euc-jisx0213′
    let s:enc_jis = ‘iso-2022-jp-3′
    endif
    ” fileencodingsを構築
    if &encoding ==# ‘utf-8′
    let s:fileencodings_default = &fileencodings
    let &fileencodings = s:enc_jis .’,’. s:enc_euc .’,cp932′
    let &fileencodings = &fileencodings .’,’. s:fileencodings_default
    unlet s:fileencodings_default
    else
    let &fileencodings = &fileencodings .’,’. s:enc_jis
    set fileencodings+=utf-8,ucs-2le,ucs-2
    if &encoding =~# ‘^\(euc-jp\|euc-jisx0213\|eucjp-ms\)$’
    set fileencodings+=cp932
    set fileencodings-=euc-jp
    set fileencodings-=euc-jisx0213
    set fileencodings-=eucjp-ms
    let &encoding = s:enc_euc
    let &fileencoding = s:enc_euc
    else
    let &fileencodings = &fileencodings .’,’. s:enc_euc
    endif
    endif
    ” 定数を処分
    unlet s:enc_euc
    unlet s:enc_jis
    endif
    ” 日本語を含まない場合は fileencoding に encoding を使うようにする
    if has(‘autocmd’)
    function! AU_ReCheck_FENC()
    if &fileencoding =~# ‘iso-2022-jp’ && search(“[^\x01-\x7e]“, ‘n’) == 0
    let &fileencoding=&encoding
    endif
    endfunction
    autocmd BufReadPost * call AU_ReCheck_FENC()
    endif
    ” 改行コードの自動認識
    set fileformats=unix,dos,mac
    ” □とか○の文字があってもカーソル位置がずれないようにする
    if exists(‘&ambiwidth’)
    set ambiwidth=double
    endif

  207. Anonymous said, on November 15, 2009 at 10:51 pm

    ” 前回終了したカーソル行に移動
    autocmd BufReadPost * if line(“‘\””) > 0 && line(“‘\””) <= line("$") | exe "normal g`\"" | endif

  208. Anonymous said, on November 15, 2009 at 10:58 pm

    apt-get

    apt-getコマンドのまとめ

    問い合わせ
    ・インストールされたパッケージの情報を取得(表示されるわけではありません。情報収集)

    # apt-cache gencaches

    ・パッケージの情報を表示します。(既にパッケージがインストールされており、なおかつ新しいバージョンが利用可能な場合、新しいバージョンの情報を上に表示します。)

    # apt-cache show [パッケージ]

    ・パッケージの詳細情報を表示します。

    # apt-cache showpkg [パッケージ]

    ・パッケージの依存情報を表示

    # apt-cache depends [パッケージ]

    ・キーワードを指定しパッケージを検索、依存するパッケージも表示。*Keyword=ftpとか

    # apt-cache search [キーワード]

    ・パッケージに含まれるファイル名からパッケージを検索。 (auto-aptを使用します。auto-aptを始めて利用する場合は、以下の手順を実行してください。updateが終ったら、使用できるようになります。)

    # apt-get install auto-apt

    # auto-apt update

    # auto-apt search [ファイル名]

    インストール
    ・パッケージをインストールする

    # apt-get install [パッケージ]

    ・パッケージを再インストールする。

    # apt-get –reinstall install [パッケージ]

    ・testingのパッケージをインストールする

    # apt-get install [パッケージ]/testing

    ・unstableのパッケージをインストールする

    # apt-get install [パッケージ]/unstable

    削除
    ・パッケージの削除 (設定ファイルは残ります、依存関係にあるパッケージは削除します)

    # apt-get remove [パッケージ]

    ・パッケージを削除する(設定ファイルも削除、依存関係にあるパッケージも削除します)

    # apt-get –purge remove [パッケージ]

    ・パッケージの強制削除

    # apt-get –purge –force-yes remove [パッケージ]

    ・その他 souces.list にある内容を反映(パッケージ情報を更新)

    # apt-get update

    ・取得したパッケージアーカイブで利用していないものを削除(/var/cache/apt/archives)

    # apt-get autoclean

    ・取得したパッケージアーカイブを全て削除(/var/cache/apt/archives)

    # apt-get clean

    タグ : apt-get Fedora Core

  209. Anonymous said, on November 15, 2009 at 11:09 pm

    https://forums.ubuntulinux.jp/viewtopic.php?pid=6577

    LaTeXのソースファイルとしてUTF-8を使えるようにすべきだと思いますし、実際に利用できるソフトウェアはいくつか存在します。

    fourier による投稿:

    xetexというのがあるそうですが、
    今euc-jpを利用してコンパイルが出来る環境から
    コンパイラだけxetexにしてutf-8でコンパイル出来るように出来ないでしょうか?

    xetexなるものを知らなかったのですが、これはTeX Liveの2007以降に統合されているようです。7.10なら(たぶん7.04も)
    sudo apt-get install texlive-xetex
    で、インストールできます。texソースへの書き方はTeX WikiにあるXeTeX紹介ページの実行例を参照されると良いでしょう。コマンド名も違いますし、ptexとは共存できると思います。

    ただし、上記URLの最後の方にも書いてありますが、日本語の組版ルールをあまり知らないようですので、platexに比べると日本語の処理に難があるかもしれません。

    日本語をメインに使いつつUTF-8を使いたいのであれば、ptetexをおすすめします。これは、LaTeXで日本語を使うために必要なアレコレを一つにまとめて、さらにTeXファイルの文字コードとしてUTF-8も使えるようにしてくれたものです(正確には、UTF-8ファイルを自動でEUC-JPなど適切な文字コードに変換してptexなどに渡してくれる?)。また、インストール先は/usr/local/teTeX以下となるので、latex-env-jaなどでインストールされるptexとも共存可能です。ただし、パッケージは存在しないので自分でコンパイルする必要があります。

    latex- env-jaによってインストールされるpTeXは、teTeXをベースに作成されています。しかしながらteTeXはすでに開発が終了し、その代替としてTeX Liveが主流となっています。Ubuntuでもtetexパッケージは存在するのですが、これをインストールしようとすると、実際にインストールされるのはtexliveパッケージです。上記ptetexでも、現在texliveに対応したptexliveを開発されていますし、TeX Liveの方も2008以降でpTeXの成果を取り込んでいくという動きもあるようです。

    今後は(hardyかその次以降は)、日本語対応もUTF-8対応もTeX Liveを基軸に動くことになると思います。現在、両方とも多少手間がかかるのはTeX Liveへの過渡期だからということで、どうか一つよろしくお願いします。

  210. Anonymous said, on November 15, 2009 at 11:16 pm

    http://umekichida.exblog.jp/8730738/

    1 vi

    viを使って編集しようとしたところ、まともに動かないのでvimを入れなおしました。
    そしたらちゃんと動いたので。

    #apt-get install vim

    2 日本語バージョンの初期設定

    GUIに任せてやりました。

       システム-システム設定-日本語版セットアップ・ヘルパを起動。

    インストールできるものは
    ・ebview (辞書ブラウザ)
    ・edict-fpw(和英辞書)
    ・giiten(日本語辞書)
    ・thunderbird(メール/ニュースクライアント)
    ・sylpheed(メールクライアント)
    ・kazehakase(ウェブブラウザ)
    ・spamassassin-rules-ja(日本語フィルタルール)
    ・ubuntu-restricted-extras(制限つき拡張パッケージ)
    ・xpdf-japanese(xpdf日本語サポート)
    ・realplayer
    ・adobereader-jpn
    ・adovereder-jpn-ipamonafont
    ・lha-sjis(SHIFT-JISファイル名対応LHA)
    ・emacs-env-ja(Emacs日本語環境)
    ・latex-env-ja(LaTeX日本語環境)
    ・latex-extra-ja(LaTex日本語環境拡張)
    ・jd(2chブラウザJD)
    ・ochusha(2chブラウザオおちゅ~しゃ)
    ・skype

    2chブラウザまで標準搭載とは・・・

    3 日本語入力

    できなかったことにいまさら気づいたので。

    SCIMとAnthyがどの段階で入っているかわからなかったので、一応、

      #sudo apt-get update
      #sudo apt-get dist-upgrade

    (初めてだったら、おそらく結構時間かかります)

    そして、

      #sudo apt-get install scim-bridge

    終わったら、端末上で

      右クリック-入力メソッド-SCIM Bridge Input Method

    を選択。

    あと、firefoxを使っているときにSCIMが落ちるらしいので

      システム-設定-SCIM入力メソッドの設定

    を選択して、

      フロントエンド-全体設定-すべてのアプリケーションで同一入力メソッド使用

    のチェックをはずし、端末で

      #vi /usr/bin/firefox


      
      export GTK_IM_MODULE=scim-bridge

    を追加。

  211. Anonymous said, on November 17, 2009 at 11:54 pm

    Samba

    http://www.miloweb.net/samba.html

  212. System call into a variable said, on November 18, 2009 at 12:29 am

    Try using popen:

    main (void) {
    
    char *systemcall="date";
    char tovariable[99];
    FILE *pp;
    
    pp=popen(systemcall,"r");
    
    fgets( tovariable , sizeof(tovariable), pp );
    
    pclose(pp);
    
    }
    
  213. Anonymous said, on November 19, 2009 at 2:14 pm

    OpenMP

    http://openmp.org/wp/

  214. Anonymous said, on November 19, 2009 at 4:50 pm

    OpenMP

    http://rest-term.com/contents/other/technote/index.php/OpenMP

  215. Anonymous said, on November 20, 2009 at 10:56 am

    alias platex=”platex -kanji=utf8″

    http://blog.mktime.com/archive/118.html

  216. Anonymous said, on November 20, 2009 at 12:20 pm

    Latex

    プログラム
    \lstset{breaklines=true,basicstyle=\footnotesize,frame=lines,numbers=left}
    \begin{lstlisting}
    \end{lstlisting}
    \lstset{frame=single,numbers=none}

    参考文献
    \lstset{frame=none}
    \begin{lstlisting}

    \end{lstlisting}
    \lstset{frame=single,numbers=none}

    画像環境

    \begin{figure*}[h!]
    \centering
    \fbox{\includegraphics[width=0.65\textwidth]{images/image.eps}}
    \end{figure*}

  217. Anonymous said, on November 20, 2009 at 12:45 pm

    CUDA

    //cutCreateTimer(&timer);
    //cutResetTimer(timer);
    //cutStartTimer(timer);

    // cudaThreadSynchronize();
    //cutStopTimer(timer);

  218. Anonymous said, on November 25, 2009 at 12:45 pm

    C++ string 演算

    http://docs.sun.com/source/820-2985/general/12_2.htm

  219. Anonymous said, on November 30, 2009 at 7:48 pm

    An A-Z Index of the Bash command line for Linux

    http://ss64.com/bash/index.html

  220. Anonymous said, on November 30, 2009 at 7:58 pm

    vim windows

    http://www.ac.cyberhome.ne.jp/~yakahaira/vimdoc/windows.html

  221. Anonymous said, on December 4, 2009 at 7:29 pm

    Install nvclock

    cd nvclock
    sh autogen.sh
    ./configure
    su
    make
    make install

    nvclock -T <- to check your current temperature
    nvclock -f -F 50 <- for 50% fanspeed
    glxgears <- to stress your card
    nvclock -T <- make sure it doesn't exceed 90 degrees

  222. Anonymous said, on December 16, 2009 at 2:22 pm

    GLIB2.0

    http://takeposo.sakura.ne.jp/unix/setting/glib2.2.html

    http://74.125.153.132/search?q=cache:zX7nkZR3YvcJ:www.gnome.gr.jp/docs/glib-2.4.x-refs/glib/html/glib-compiling.html+%22pkg-config+–cflags+glib-2.0%22&cd=1&hl=ja&ct=clnk&gl=jp

    GLib アプリケーションのコンパイル

    GLib アプリケーションのコンパイル — GLib アプリケーションのコンパイル方法

    UNIX 上での GLib アプリケーションのコンパイル

    GLib アプリケーションをコンパイルする場合は、コンパイラに GLib のヘッダ・ファイルとライブラリが格納されている場所を知らせる必要があります。そのような場合は pkg-config ユーティリティを使います。

    次に示す対話式 Shell セッションでは、pkg-config の使い方を紹介しています:

    $ pkg-config –cflags glib-2.0
    -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
    $ pkg-config –libs glib-2.0
    -L/usr/lib -lm -lglib-1.3

    アプリケーションで GLib モジュールやスレッド、あるいは GObject の機能などを使っている場合は、次のような pkg-config の “おまじない” が返すオプションを利用してコンパイル・リンクを行って下さい:

    $ pkg-config –cflags –libs gmodule-2.0
    $ pkg-config –cflags –libs gthread-2.0
    $ pkg-config –cflags –libs gobject-2.0

    アプリケーションをコンパイルする一番簡単な方法は、Shell の “バックォート” 機能を利用することです。(シングル・クォートではなく) バックォートでコマンドを囲むと、実行される前にそのコマンドの結果がコマンド・ラインの中に展開されます。例えば GLib Hello をコンパイルする場合は、次のように入力してみて下さい:

    $ cc `pkg-config –cflags –libs glib-2.0` hello.c -o hello

  223. Anonymous said, on December 18, 2009 at 11:12 am

    Linux ライブラリ管理

    http://kiyoeri.gotdns.org/joomla/content/view/77/2/

  224. Anonymous said, on December 18, 2009 at 5:20 pm

    FTGL

    PKG_CONFIG_PATH=/home/viet/Desktop/FTGL

  225. Anonymous said, on January 15, 2010 at 11:07 pm

    Fedora Printer Set Tool
    http://homepage3.nifty.com/nasunu-i/Fedora7/Printer.htm#PrinterSetTool

  226. Anonymous said, on January 15, 2010 at 11:10 pm

    Debian Printer Set Tool

    http://solutions.brother.co.jp/support/os/linux/cups_printer/install_01.html

  227. Anonymous said, on January 18, 2010 at 8:20 pm

    Ubuntu DVD

    left click Places, select ‘Computer’ menu item – the ‘Computer – File Browser’ window will open, left click on ‘Edit’ menu item, select ‘Preferences’ and the ‘File Management Preferences’ window will open. Left click on the ‘Media’ tab and there you can enable or disable autorun or autoplay for all types of CDs or DVDs. I had a hard time figuring out how to do that.

  228. Anonymous said, on January 20, 2010 at 5:14 pm

    展開した「SPECViewperf10/viewperf/viewperf10.0/viewperf/linux32(64ビット版の場合はlinux64)」というフォルダの中にあるviewperfという実行ファイルのリンクを,「SPECViewperf10/viewperf」の直下に作成し,実行権を与えておきます。

    $ ln -s ~/SPECViewperf10/viewperf/viewperf10.0/viewperf/linux32/viewperf ~/SPECViewperf10/viewperf

    $ chmod +x ~/SPECViewperf10/viewperf

    ~/SPECViewperf10/viewsets/以下のフォルダにそれぞれの実行スクリプトがxxx.cshという名前で入っているので,そのファイルの入っているディレクトリに移動して,これをrootで実行します。

    $ cd ~/SPECViewperf10/viewsets/maya-02
    $ su
    # ./maya-02.csh ~/SPECViewperf10

    後ろのオプションは,SPECViewperfを展開したディレクトリを指定します(この場合,~/SPECViewperf10)。また,rootで実行しないと動きませんでした。

  229. Anonymous said, on January 21, 2010 at 8:17 pm

    skype ubuntu

    http://blog.goo.ne.jp/gleaning/e/ca60d61801c734ff37743463afdb25fa

  230. Anonymous said, on January 27, 2010 at 2:42 pm

    http://centossrv.com/dhcp.shtml

  231. Anonymous said, on January 29, 2010 at 5:13 pm

    VTK install

    tif_fax3sm.c: Cannot create output file.と出たら。
    chmod +w ./VTK/Utilities/vtktiff/tif_fax3sm.c

  232. Anonymous said, on January 30, 2010 at 2:34 am

    VTK install

    http://home.hiroshima-u.ac.jp/~tyoshida/pyukiwiki/?vtk#i8

  233. Anonymous said, on January 30, 2010 at 2:28 pm

    システム標準の Python とは別のバージョンをインストールする方法

    http://lowlife.jp/yasusii/wiki/InstallingAnotherVersionOfPython.html

  234. Anonymous said, on January 31, 2010 at 11:01 am

    Text Processing in Python

    http://gnosis.cx/TPiP/

  235. Anonymous said, on January 31, 2010 at 11:16 am

    python books

    http://www.freeprogrammingresources.com/pythonbook.html

  236. Anonymous said, on February 4, 2010 at 2:19 pm

    alias psx=”ps -auxw ¦ grep $1″

    then executing “psx httpd” to check for apache status, or with a username to check that user’s processes – quick alternative to top.

    also,

    export PS1=”[\u][\h][\#][\w]\n# ”

    alias L=’ls -FLb’
    alias LL=’ls -FLlb’
    alias a=’alias’
    alias h=’history’
    alias j=’jobs -l’
    alias l=’ls -Fb’
    alias la=’ls -Flab’
    alias ll=’ls -Flb’
    alias m=’less’
    alias ot=’popd’
    alias to=’pushd’
    alias zm=’zless’

  237. Anonymous said, on February 4, 2010 at 2:22 pm

    $ for i in `ls *.gif ¦ sed ‘s/\(.*\).gif/\1/’` ; do cat $i.gif ¦ giftopnm ¦ pnmtopng > $i.png && rm $i.gif; done

  238. Anonymous said, on February 5, 2010 at 1:50 am

    parser

    search by key: 第10章 C++パーサを作る(その1)

    aoba.cc.saga-u.ac.jp/lecture/

  239. Anonymous said, on February 5, 2010 at 1:53 am

    parser class
    http://www.dreamincode.net/forums/showtopic110782.htm

  240. Anonymous said, on February 5, 2010 at 7:45 am

    http://cplus.about.com/od/learning1/ss/cppobjects.htm

  241. Anonymous said, on February 5, 2010 at 8:57 pm

    C++ class
    http://people.msoe.edu/tritt/cpp/examples.html

  242. Anonymous said, on February 6, 2010 at 12:51 am

    http://www.imaging.robarts.ca/~dgobbi/vtk/vtkcourse/index.html

    Introduction to Programming in VTK

    Quick Overview: What is VTK?

    * an enormous library of C++ classes for interactive visualization of 3D data

    What does VTK do well?

    * creation and manipulation of geometrical data
    * efficent image processing (parallel implementation)
    * interactive data visualization

    What does VTK not do well?

    * memory hog (not as bad as MATLAB!)
    * producing graphs (use Excel or MATLAB)
    * linear algebra (use MATLAB or Python)

    Another Caveat:

    * VTK is rumoured to have a steep learning curve
    * (which is why we have this course to help you out)

  243. Anonymous said, on February 6, 2010 at 5:25 pm

    String split

    http://www.geocities.jp/katayama_hirofumi_mz/cpp/split.htm

  244. Anonymous said, on February 7, 2010 at 2:26 am

    cout <> “;

    char any;
    cin >> any;

    return 0;

  245. Anonymous said, on February 8, 2010 at 11:18 pm

    Nguyen divides test into two categories. First is verification, in which a product passes a checklist of tests before being shipped to a customer. Second is troubleshooting, in which engineers try to figure out why a product exhibits an anomaly every so often.

    “To find out what caused that anomaly, we first determine whether it’s a phenomenon that can be duplicated reliably. We then try to narrow down the cause of that phenomenon to a particular piece of hardware or particular piece of software, so we devise tests to find out what the source of the problem is. We try to eliminate potential sources to eventually narrow down our search to the particular source that caused the problem.

    “It’s just like gardening,” he continued. “I plant roses, and if my roses don’t grow well, I need to determine whether the problem is the location or too much or too little fertilizer.” In fact, he said, “Everyone does some sort of testing every day. We all—not just scientists and engineers—do it all the time.”

  246. Anonymous said, on February 8, 2010 at 11:56 pm

    http://www5.atwiki.jp/ciez/pages/25.html

    Load and access VTK data

  247. Anonymous said, on February 9, 2010 at 12:59 am

    C++ books
    http://openpdf.com/ebook/alexandrescu-design-pdf.html

  248. Anonymous said, on February 10, 2010 at 12:53 am

    C++ Exception_Handling
    http://www.dmoz.org/Computers/Programming/Languages/C%2B%2B/Exception_Handling/

  249. Anonymous said, on February 12, 2010 at 6:01 pm

    Date

    date +”%Y.%b.%d.%H.%M”

  250. Anonymous said, on February 12, 2010 at 6:54 pm

    VTK install

    http://www.db.is.kyushu-u.ac.jp/rinkou/linux/vtk.html

  251. Anonymous said, on February 13, 2010 at 12:47 pm

    plot3D dataformat

    http://www.msi.umn.edu/software/fast/tutorial/fast-plot3dformats.html#Structured

  252. Anonymous said, on February 18, 2010 at 12:29 pm

    crontab setting

    http://www.express.nec.co.jp/linux/distributions/knowledge/system/crond.html

  253. Anonymous said, on February 19, 2010 at 5:40 pm
    # PGI settings
    export PGI=/opt/pgi
    export PATH=$PGI/linux86-64/2010/bin:$PATH
    export PATH=$PGI/linux86-64/2010/mpi/mpich/bin:$PATH
    export MANPATH=$MANPATH:$PGI/linux86-64/2010/man
    export LM_LICENSE_FILE=$PGI/license.dat
    
  254. add date to file name said, on February 20, 2010 at 1:00 pm
    
    #!/bin/sh
    # script=dname
    #parameter  $1 is the existing file name
    date=`date +%y%b%d%a`
    time=`date +%H%M`
    mv $1 $1.$date.$time
    
    
  255. list info said, on February 20, 2010 at 1:29 pm
    
    #!/bin/sh
    clear
    echo '                       ##### PCI INFO #####'
    /sbin/ifconfig
    echo '                       ##### PCI INFO #####'
    /sbin/lspci
    echo '                       ##### CPU INFO #####'
    cat /proc/cpuinfo
    echo '                       ##### PARTITION INFO #####'
    cat /proc/partitions
    echo '                       ##### SWAP INFO #####'
    cat /proc/swaps
    echo '                       ##### KERNAL VERSION INFO #####'
    cat /proc/version
    echo '                       ##### MEMORY INFO #####'
    cat /proc/meminfo
    echo '                       ##### MODULE INFO #####'
    cat /proc/modules
    echo '                       ##### MOUNT INFO #####'
    cat /proc/mounts
    echo '                       ##### UPTIME #####'
    uptime
    echo '                       ##### FREE MEMORY INFO #####'
    free
    echo '                       ##### DISK INFO #####'
    df -h
    echo '                       ##### SHELL INFO #####'
    cat /etc/shells
    echo '                       ##### SERVICE INFO #####'
    /sbin/chkconfig --list
    #hdparm /dev/hda
    
    
  256. Anonymous said, on February 21, 2010 at 12:52 pm

    di” “の中を削除
    da” “も含めて削除
    yi” “の中をコピー
    ya” “も含めてコピー
    di( ()の中を削除
    da( ()も含めて削除
    di{ {}の中を削除
    da{ {}も含めて削除

    gf カーソル以下のファイル名を開いてくれる。requireやinclude、ファイルをオープンしたりする処理のところで便利

    本当に挿入するなら:r!{cmd} (:read !{cmd})

  257. Anonymous said, on February 24, 2010 at 1:50 am

    wake on lan

    http://dimmeria.com/?q=node/1755

  258. Anonymous said, on February 24, 2010 at 1:51 am

    00:01:80:77:c7:00

  259. Anonymous said, on February 25, 2010 at 7:18 pm

    Latex sample

    http://www.math.duke.edu/computing/tex/templates.html

  260. Anonymous said, on February 28, 2010 at 11:27 pm

    typing game
    http://www.ankohouse.com/j/Game5/u_maxmaxmax.html

  261. Anonymous said, on February 28, 2010 at 11:39 pm

    http://neutralx0.net/game.html

  262. Anonymous said, on March 3, 2010 at 2:32 am

    vtkXMLMultiBlockDataWriter

    http://old.nabble.com/TemporalDataSet-examples-td18096276.html

  263. Anonymous said, on March 5, 2010 at 1:47 am

    NS3D_FEM
    Steady Navier Stokes Equations in 3D – Finite Element Solution

    http://people.sc.fsu.edu/~burkardt/m_src/ns3d_fem/ns3d_fem.html

  264. Anonymous said, on March 13, 2010 at 2:57 am

    vtk tutorial
    http://www.bu.edu/tech/research/training/tutorials/vtk/

  265. Anonymous said, on March 13, 2010 at 2:50 pm

    emacs起動時にSCIM-Anthyを無効にしたい場合は、端末から
    XMODIFIERS=@im=none emacs
    と打ち込めばOKです。

    長ったらしいので

    alias emacs=’XMODIFIERS=@im=none emacs’

    と端末に入力して、別名定義すれば次回からemacsと打ち込むだけでOKになります。

    このままだと別名定義は再起動すれば消えてしまうので~/.bashrcに上の定義を書いておきましょう。

  266. Anonymous said, on March 14, 2010 at 2:44 am

    ~# touch /var/log/mycron.log

    ~#crontab -e

    /root/file/cron.sh

    */1 * * * * sh /root/file/cron.sh >> /var/log/mycron.log 2>&1

    ~# tail -f /var/log/mycron.log

  267. Anonymous said, on March 14, 2010 at 3:54 pm

    ubuntu setting

    http://home.hiroshima-u.ac.jp/~tyoshida/pyukiwiki/?Ubuntu#i183

  268. Anonymous said, on March 14, 2010 at 3:58 pm

    VTK install
    http://home.hiroshima-u.ac.jp/~tyoshida/pyukiwiki/?vtk

  269. Anonymous said, on March 14, 2010 at 9:31 pm

    How to install the new mesa version 7.0
    WORKS WITH MESA 7.0.1

    Download from http://sourceforge.net/project/showfiles.php?group_id=3 MesaLib.tar.gz file

    Install libdrm-dev (needed for compilation):

    $ sudo aptitude install libdrm-dev libdrm-dev build-essential xorg-dev

    Nota: DRM is Direct Rendering Manager, it is not Digitals Rights Management.

    Decompress it, I save it in ~/misc

    $ tar xzvf MesaLib-7.0.tar.gz

    It make Mesa-7.0 folder, enter in:

    $ cd Mesa-7.0

    Begin compile. For 32bits:

    $ make linux-dri-x86

    For 64bits:

    $ make linux-dri-x86-64

    … wait compile … paciencia … más paciencia…

    Tips: In config/linux-dri-* files can write compile optimizations. For example I used:
    ARCH_FLAGS = -m32 -O2 -march=pentium-m

    If all was ok then you can see this files on lib/ :

    $ ls lib/

    ffb_dri.so i915_dri.so i965_dri.so libGL.so.1 libGLU.so libGLU.so.1.3.070100 libGLw.so.1 mach64_dri.so r128_dri.so r300_dri.so s3v_dri.so sis_dri.so trident_dri.so
    i810_dri.so i915tex_dri.so libGL.so libGL.so.1.2 libGLU.so.1 libGLw.so libGLw.so.1.0.0 mga_dri.so r200_dri.so radeon_dri.so savage_dri.so tdfx_dri.so unichrome_dri.so

    The libraries are installed in /usr/local/lib and drivers in /usr/X11R6/lib/modules/dri. We need libraries in /usr/lib and drivers in /usr/lib/dri. We must edit configs/default (line 81 and 82):

    # Installation directories (for make install)
    INSTALL_DIR = /usr/local
    DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri

    Change to:

    # Installation directories (for make install)
    INSTALL_DIR = /usr/
    DRI_DRIVER_INSTALL_DIR = /usr/lib/dri

    Now we can install:

    $ sudo make install

    Restart and voila!!

  270. Anonymous said, on March 15, 2010 at 12:17 am

    dot emacs
    http://emacs-21.ki.nu/dot.emacs/samples.html

  271. bashrc said, on March 15, 2010 at 12:33 am
    
    # ~/.bashrc: executed by bash(1) for non-login shells.
    # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
    # for examples
    
    # If not running interactively, don't do anything
    [ -z "$PS1" ] &amp;&amp; return
    
    # don't put duplicate lines in the history. See bash(1) for more options
    # don't overwrite GNU Midnight Commander's setting of `ignorespace'.
    export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
    # ... or force ignoredups and ignorespace
    export HISTCONTROL=ignoreboth
    
    # append to the history file, don't overwrite it
    shopt -s histappend
    
    # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
    
    # check the window size after each command and, if necessary,
    # update the values of LINES and COLUMNS.
    shopt -s checkwinsize
    
    # make less more friendly for non-text input files, see lesspipe(1)
    [ -x /usr/bin/lesspipe ] &amp;&amp; eval "$(SHELL=/bin/sh lesspipe)"
    
    # set variable identifying the chroot you work in (used in the prompt below)
    if [ -z "$debian_chroot" ] &amp;&amp; [ -r /etc/debian_chroot ]; then
        debian_chroot=$(cat /etc/debian_chroot)
    fi
    
    # set a fancy prompt (non-color, unless we know we "want" color)
    case "$TERM" in
        xterm-color) color_prompt=yes;;
    esac
    
    # uncomment for a colored prompt, if the terminal has the capability; turned
    # off by default to not distract the user: the focus in a terminal window
    # should be on the output of commands, not on the prompt
    #force_color_prompt=yes
    
    if [ -n "$force_color_prompt" ]; then
        if [ -x /usr/bin/tput ] &amp;&amp; tput setaf 1 &gt;&amp;/dev/null; then
    	# We have color support; assume it's compliant with Ecma-48
    	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
    	# a case would tend to support setf rather than setaf.)
    	color_prompt=yes
        else
    	color_prompt=
        fi
    fi
    
    if [ "$color_prompt" = yes ]; then
        PS1='${debian_chroot:+($debian_chroot)}\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\]\$ '
    else
        PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    fi
    unset color_prompt force_color_prompt
    
    # If this is an xterm set the title to user@host:dir
    case "$TERM" in
    xterm*|rxvt*)
        PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
        ;;
    *)
        ;;
    esac
    
    # Alias definitions.
    # You may want to put all your additions into a separate file like
    # ~/.bash_aliases, instead of adding them here directly.
    # See /usr/share/doc/bash-doc/examples in the bash-doc package.
    
    #if [ -f ~/.bash_aliases ]; then
    #    . ~/.bash_aliases
    #fi
    
    # enable color support of ls and also add handy aliases
    if [ -x /usr/bin/dircolors ]; then
        eval "`dircolors -b`"
        alias ls='ls --color=auto'
        alias dir='dir --color=auto'
        alias vdir='vdir --color=auto'
    
        alias grep='grep --color=auto'
        alias fgrep='fgrep --color=auto'
        alias egrep='egrep --color=auto'
    fi
    
    # some more ls aliases
    #alias ll='ls -l'
    #alias la='ls -A'
    #alias l='ls -CF'
    
    alias cp='cp -i'
    alias df='df -h -T'
    alias ec='export LANG=C'
    alias hs='history'
    alias l.='ls -d .* --color=tty'
    alias la='ls -la'
    alias ll='ls -l --color=tty'
    #alias ls='ls --color=auto'
    alias mv='mv -i'
    alias ps15='ps -eo pcpu,pid,user,args | sort -k 1 -r | head -15'
    alias rm='rm -i'
    alias sb='source ~/.bashrc'
    alias sc='screen'
    alias tarc='tar cvzf'
    alias tarx='tar xvzf'
    alias u='cd ../;ls'
    alias uu='cd ../../;ls'
    alias uuu='cd ../../../;ls'
    alias vb='vi ~/.bashrc'
    alias vi='vim'
    alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
    alias cdd='cd ~/Desktop;ls'
    alias emacs=’XMODIFIERS=@im=none emacs’
    
    
    
    
    
    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
    # sources /etc/bash.bashrc).
    if [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
    fi
    # CUDA stuff
    PATH=$PATH:/usr/local/cuda/bin
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib
    export PATH
    export LD_LIBRARY_PATH
    
    
  272. Anonymous said, on March 15, 2010 at 12:50 am

    org mode setting

    ;Org mode
    ;(setq load-path (cons “~/path/to/orgdir/lisp” load-path))
    ;(setq load-path (cons “~/path/to/orgdir/contrib/lisp” load-path))
    ;(require ‘org-install)

    ;; The following lines are always needed. Choose your own keys.
    (add-to-list ‘auto-mode-alist ‘(“\\.org\\’” . org-mode))
    (global-set-key “\C-cl” ‘org-store-link)
    (global-set-key “\C-ca” ‘org-agenda)
    (global-set-key “\C-cb” ‘org-iswitchb)

    (global-font-lock-mode 1) ; for all buffers
    (add-hook ‘org-mode-hook ‘turn-on-font-lock) ; Org buffers onl
    (transient-mark-mode 1)

  273. Anonymous said, on March 15, 2010 at 12:56 am

    https://wiki.ubuntulinux.jp/UbuntuTips/Application/EmacsJapaneseSetup

    # Synapticパッケージマネージャを起動し、emacs21をインストールします。

    $ sudo apt-get install emacs21

    # UTF-8を使う場合は、mule-ucsをインストールします。

    $ sudo apt-get install mule-ucs

    # Anthy-elを利用して日本語を入力したい場合は、anthy-elをインストールします。

    $ sudo apt-get install anthy-el

    # emacs21-el、emacs-goodies-elをインストールすることで、Emacs上で動く便利ツール群がインストールされます(diredファイラ等)。

    $ sudo apt-get install emacs21-el emacs-goodies-el

    # 設定ファイル(~/.emacs)をエディタで作成します(方法1参照)。

    ;======================================================================
    ; 言語・文字コード関連の設定
    ; Emacs 22(Gutsy)では、un-define の設定なしで utf-8 が使えます
    ;======================================================================
    (require ‘un-define)
    (set-language-environment “Japanese”)
    (set-terminal-coding-system ‘utf-8)
    (set-keyboard-coding-system ‘utf-8)
    (set-buffer-file-coding-system ‘utf-8)
    (setq default-buffer-file-coding-system ‘utf-8)
    (prefer-coding-system ‘utf-8)
    (set-default-coding-systems ‘utf-8)
    (setq file-name-coding-system ‘utf-8)
    ;;
    ;======================================================================
    ; Anthy
    ; CTRL-\で入力モード切替え
    ;======================================================================
    (load-library “anthy”)
    (setq default-input-method “japanese-anthy”)
    ;;
    ;=======================================================================
    ;フォント
    ;=======================================================================
    ;(cond (window-system
    ; (set-default-font “-*-fixed-medium-r-normal–14-*-*-*-*-*-*-*”)
    ; (progn
    ; (set-face-font ‘default
    ; “-shinonome-gothic-medium-r-normal–14-*-*-*-*-*-*-*”)
    ; (set-face-font ‘bold
    ; “-shinonome-gothic-bold-r-normal–14-*-*-*-*-*-*-*”)
    ; (set-face-font ‘italic
    ; “-shinonome-gothic-medium-i-normal–14-*-*-*-*-*-*-*”)
    ; (set-face-font ‘bold-italic
    ; “-shinonome-gothic-bold-i-normal–14-*-*-*-*-*-*-*”)
    ; )))
    ;;
    ;=======================================================================
    ;フレームサイズ・位置・色など
    ;=======================================================================
    ;(setq initial-frame-alist
    ; (append (list
    ; ‘(foreground-color . “white”) ;; 文字色
    ; ‘(background-color . “#333366″) ;; 背景色
    ; ‘(border-color . “black”)
    ; ‘(mouse-color . “white”)
    ; ‘(cursor-color . “white”)
    ; ‘(width . 90) ;; フレームの幅
    ; ‘(height . 49) ;; フレームの高さ
    ; ‘(top . 0) ;; Y 表示位置
    ; ‘(left . 340) ;; X 表示位置
    ; )
    ; initial-frame-alist))
    ;(setq default-frame-alist initial-frame-alist)
    ;;
    ;=======================================================================
    ; Misc
    ;=======================================================================
    (mouse-wheel-mode) ;;ホイールマウス
    (global-font-lock-mode t) ;;文字の色つけ
    (setq line-number-mode t) ;;カーソルのある行番号を表示
    (auto-compression-mode t) ;;日本語infoの文字化け防止
    (set-scroll-bar-mode ‘right) ;;スクロールバーを右に表示
    (global-set-key “\C-z” ‘undo) ;;UNDO
    (setq frame-title-format ;;フレームのタイトル指定
    (concat “%b – emacs@” system-name))

    ;(display-time) ;;時計を表示
    ;(global-set-key “\C-h” ‘backward-delete-char) ;;Ctrl-Hでバックスペース
    ;(setq make-backup-files nil) ;;バックアップファイルを作成しない
    ;(setq visible-bell t) ;;警告音を消す
    ;(setq kill-whole-line t) ;;カーソルが行頭にある場合も行全体を削除

  274. Anonymous said, on March 15, 2010 at 1:10 am

    Org mode tutorial

    http://orgmode.org/worg/org-tutorials/orgtutorial_dto.php

  275. Anonymous said, on March 15, 2010 at 2:22 am

    http://members.optusnet.com.au/~charles57/GTD/org_dates/index.html

    Inserting dates
    C-c . Prompt for active date
    C-c ! Prompt for inactive date
    C-c C-d Enter a DEADLINE date
    C-c C-s Enter a SCHEDULED date

    Calendar Navigation
    Shift-RIGHT Go forward a day
    Shift-LEFT Go backward a day
    Shift-UP Go to previous week
    Shift-DOWN Go to next week
    Scroll calendar forward 1 month
    . Go to Today

    Notice that just the top-level headings are shown. You can hit shift-TAB again to show all headings, including TODO items.

    Let’s add some more TODO items. Position the cursor on the next line, and hit M-shift-RET to call org-insert-todo-heading. You can hit it several times to add several TODOs.

    it’s best to set aside a separate directory where your org files will be kept. I recommend using ~/org.

    (require ‘org-install)
    (add-to-list ‘auto-mode-alist ‘(“\\.org$” . org-mode))
    (define-key global-map “\C-cl” ‘org-store-link)
    (define-key global-map “\C-ca” ‘org-agenda)
    (setq org-log-done t)

    This will make sure org gets loaded, and some basic global key combinations are defined. We’ll go over what “org-store-link” and “org-agenda” do later in this document.

    http://www.linuxjournal.com/article/9116?page=0,1

    Plain Lists

    Sometimes you may need to add a plain list within the body of a subtree that is not part of the tree structure of the document. To add an unordered plain list, start the line with – or +. To make Org-mode add a – or + at the start of subsequent list items automatically, use M-Return to insert the next list item. To add an ordered list, start the line with 1., and to make Org-mode number subsequent items automatically, use M-Return to insert the next list item. Add an item in the middle of an ordered list, and Org-mode automatically renumbers the list items. You can mix ordered and unordered lists too. Want to add check boxes to a plain list? Start the list item with -[ ]. You can toggle the check box using C-c C-c, which displays the check box as [X]

  276. Anonymous said, on March 15, 2010 at 2:24 am

    Org mode tutorial

    http://www.linuxjournal.com/article/9116?page=0,1
    Plain Lists

    Sometimes you may need to add a plain list within the body of a subtree that is not part of the tree structure of the document. To add an unordered plain list, start the line with – or +. To make Org-mode add a – or + at the start of subsequent list items automatically, use M-Return to insert the next list item. To add an ordered list, start the line with 1., and to make Org-mode number subsequent items automatically, use M-Return to insert the next list item. Add an item in the middle of an ordered list, and Org-mode automatically renumbers the list items. You can mix ordered and unordered lists too. Want to add check boxes to a plain list? Start the list item with -[ ]. You can toggle the check box using C-c C-c, which displays the check box as [X]

  277. Anonymous said, on March 15, 2010 at 10:09 am

    http://d.hatena.ne.jp/l1o0/20100221/1266755071

    ;; ———————————————————
    ;; 今日の TODO 挿入関数
    ;; ———————————————————
    (setq my-morning-todo
    “*** 朝ルーチン [/] :WORK:
    - [ ] メール確認
    - [ ] 作業時間チェック
    - [ ] 机の上を片付ける (ノートを広げて、ペンと消しゴムを出すまで)
    - [ ] サイボウズの予定を確認(今日やること、今後一週間やること)
    - [ ] Sunbird の予定を確認 (今日やること、今後一週間やること)
    - [ ] 残務確認
    - [ ] 今日の予定を書き込む
    - [ ] 必要なファイルとフォルダを開く
    - [ ] 仕事を一つ片付ける
    “)

    (setq my-everyday-todo
    “*** 毎日ルーチン [/]
    - [ ] 資格
    - [ ] トレーニング(内容: )
    - [ ] ストレッチ
    - [ ] 英語
    - [ ] Joe’s Goal 更新
    - [ ] 1:30 までに就寝
    “)

    (setq my-weekday-todo
    ‘(
    “*** 日曜日 ルーチン [/]
    - [ ] 資源ゴミ
    - [ ] blog 更新

    “*** 月曜日 ルーチン [/]
    - [ ] 不要書類整理

    “*** 火曜日 ルーチン [/]
    - [ ] バックアップ確認

    “*** 水曜日 ルーチン [/]
    – [ ] ゴミ出し

    “*** 木曜日 ルーチン [/]
    - [ ] ゴミ出し

    “*** 金曜日 ルーチン [/]
    - [ ] 週間レビュー(残務、来週スケジューリング)

    “*** 土曜日 ルーチン [/]
    - [ ] 掃除
    - [ ] 洗濯

    ))

    (defun my-insert-today-todo ()
    (interactive)
    (let (weekday)
    (setq weekday (format-time-string “%w” (current-time)))
    (insert-string
    (concat “* \n”
    “** TODO\n”
    my-morning-todo
    my-everyday-todo
    (nth (string-to-number
    (format-time-string “%w” (current-time)))
    my-weekday-todo)
    ))))

  278. Anonymous said, on March 15, 2010 at 10:57 am

    vtk format
    http://dunne.uni-hd.de/VisuSimple/documents/vtkfileformat.html

  279. Load and access VTK data said, on March 15, 2010 at 11:04 am
    
    
    vtkUnstructuredGridReader *polyDataReader = vtkUnstructuredGridReader::New();
    //  polyDataReader-&gt;DebugOn();
      polyDataReader-&gt;ReadAllScalarsOn(); //NEVER FORGET THIS
      polyDataReader-&gt;ReadAllVectorsOn(); //NEVER FORGET THIS
      polyDataReader-&gt;SetFileName(str_vtk_file);
      polyDataReader-&gt;Update();
      vtkUnstructuredGrid *polyData = polyDataReader-&gt;GetOutput();
      if (polyData == NULL) {
        printf("##ERROR: polyData == NULL\n");
      }
      printf("NUMBER OF POINTS: %d\n", polyData-&gt;GetPoints()-&gt;GetNumberOfPoints());
      printf("NUMBER OF CELLS: %d\n", polyData-&gt;GetNumberOfCells());
      printf("POINTS EXAMPLE: %d\n");
      for (int i=0; iGetPoint(i)[0], polyData-&gt;GetPoint(i)[1], polyData-&gt;GetPoint(i)[2]);
      }
      printf("ELEMENTS EXAMPLE: %d\n");
      for (int i=0; iGetCell(i)-&gt;GetCellType());
        for (int j=0; jGetCell(i)-&gt;GetNumberOfPoints(); j++)
          printf("%d ", polyData-&gt;GetCell(i)-&gt;GetPointId(j));
        printf("\n");
      }
      printf("POINT DATA: \n");
      for (int i=0; iGetNumberOfArrays(); i++) {
        printf("%s\n", pd-&gt;GetArrayName(i));
      }
     
      vtkPointData *pd = polyData-&gt;GetPointData();
      vtkDataArray *arrT = pd-&gt;GetScalars("TEMPERATURE1");
      double sum_T = 0.0;
      double tmp_T = 0.0;
     
      for (long i=0; iGetNumberOfTuples(); i++) {
        tmp_T = arrT-&gt;GetComponent(i, 0);
        sum_T += tmp_T;
      }
      polyDataReader-&gt;Delete();
    
  280. Anonymous said, on March 15, 2010 at 12:03 pm

    setting VTK_DIR variable
    Assuming that you installed vtk to /usr/local/vtk library you would add the
    following line to .bashrc and .profile
    export VTK_DIR=/usr/local/vtk/lib/vtk5.0.
    The idea here is to set VTK_DIR to the directory containing UseVTK.cmake and
    VTKConfig.cmake.

  281. Anonymous said, on March 15, 2010 at 12:57 pm

    http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerGradientsWidget.cxx?rev=5727&r1=5707&r2=5727

    this->Gradients->GetTuple(i,g);
    factor->InsertNextValue(sqrt(g[0]*g[0]+g[1]*g[1]+g[2]*g[2]));

  282. Anonymous said, on March 15, 2010 at 11:08 pm

    Org Mode – Organize Your Life In Plain Text!
    http://doc.norang.ca/org-mode.html

  283. Anonymous said, on March 16, 2010 at 4:41 pm

    05.31.2009 at 08:46PM PDT, ID: 24514955
    khkremer’s solution works, but one can drop the colons since vim is already in ex mode when you start it with the -c option. So
    vim -c “:normal =G” -c “:wq” test.cpp
    ca be replaced with
    vim -c 1 -c “normal =G” -c wq test.cpp
    where just to be safe, i’ve added “-c 1″ as the first command to take us to line 1

    Equivalently, one can use vim’s batch mode (also called silent or scripting mode). Prepare a vim script (indent.vim)
    —————————
    1
    normal =G
    wq
    —————————
    and run vim as
    vim -u ~/.vimrc -e -s < indent.vim test.cpp

    It took me a while to figure out that the -u option is necessary. without this option, all lines would get aligned to column 1. So i think indentation is happening but the wrong one. The vim reference manual says that in the -e -s mode "Initializations are skipped (except the ones given with the "-u" argument)", i still don't know what setting is it in my .vimrc that's causing the correct indentation to happen.

    Well, it works, but i'd be more satisfied if someone can clear up the mystery…

  284. Anonymous said, on March 16, 2010 at 5:54 pm

    indent -br-ce-di2-nbc-bfda

  285. Anonymous said, on March 17, 2010 at 1:00 pm

    // Old Code

    //lsdActor->SetMapper (vtkmapper);
    // double range[2];
    // cutData->GetScalarRange(range);
    // attbArray->GetRange(range);
    // cout<<"min = "<<range[0]<<endl;
    // cout<<"max = "<<range[1]<SetInput(cutData);
    // mapper->SetScalarRange(range);

    // lut->SetHueRange (0.667, 0.0);
    // mapper->SetLookupTable(lut);
    //vtkIndent idx;
    //pcta->PrintSelf(cout,idx);
    //cout<<" cell type " <GetCell(5)->GetCellType()<<endl;
    //vtkIndent indent;
    //cout<<"ugrid dump: "<PrintSelf (cout,indent);

    //vtkIndent indent;
    //cutData->PrintSelf (cout,indent);
    //int cellNum=cutData->GetNumberOfCells();
    //cout<<"cell num"<<cellNum<<endl;
    //cout<<" cell type: " <GetCell(115)->GetCellType()<<endl;

    // for (int i=0; iGetNumberOfArrays(); i++) {
    // cout<<"Array Name: "<GetArrayName(i)<AddRenderer(renderer);
    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);

    vtkScalarBarActor *colorBar = vtkScalarBarActor::New();
    colorBar->SetLookupTable(mapper->GetLookupTable() );
    colorBar->SetOrientationToVertical();
    colorBar->SetTitle( ” ” );
    colorBar->SetPosition( 0.0, 0.1 );

    renderer->AddActor( colorBar );
    vtkActor *actor = vtkActor::New();
    actor->SetMapper(mapper);
    renderer->AddActor(actor);

    renderer->SetBackground(0.5,0.5,0.5);
    renWin->SetSize(300,300);
    renWin->Render();
    iren->Start();
    renderer->Delete();
    renWin->Delete();
    iren->Delete();
    mapper->Delete();
    actor->Delete();
    */

  286. Anonymous said, on March 17, 2010 at 1:01 pm

    //Check scalar data

    //get colors
    // vtkSmartPointer scalarData = vtkDoubleArray::SafeDownCast(uGrid->GetPointData()->GetArray(“scalar0″));
    //if(scalarData) {
    // double scalar[1];
    // for(unsigned int i = 0; i < static_cast (numPoints); i++) {
    // scalarData->GetTupleValue(i, scalar);
    // cout << "scalar " << i << ": " << scalar[0] << endl;
    // }
    // }
    // else cout << "There is no scalar data"<GetCellType(0) == VTK_TRIANGLE) && (NumCells > 0) )//vtkCellType.h
    /*
    for(vtkIdType tri = 0; tri < numCells; tri++)
    {
    vtkSmartPointer cell = uGrid0->GetCell(tri);
    vtkSmartPointer pts = cell->GetPointIds();
    std::vector list(3);
    list[0] = pts->GetId(0);
    list[1] = pts->GetId(1);
    list[2] = pts->GetId(2);
    }
    */

  287. Anonymous said, on March 18, 2010 at 11:25 pm

    indent -bad -bap -nbc -br -nce -i4

  288. Anonymous said, on March 21, 2010 at 12:57 am

    http://en.wikibooks.org/wiki/Building_a_Beowulf_Cluster

    Cloning of Slaves

    When master and one slave (the golden slave) are installed and configured and now we want to scale up this configuration to more slaves by replicating the exact configuration of the golden slave.

    Installing and configuring the OS on each machine manually is cumbersome and prone to error. However, nodes are identical, so why not just copy everything we need? This process is called cloning. We first setup a so-called golden node or model node and then transfer the system to other slave machines. Each new node will come with one new entry in the head node’s DHCP server file (/etc/dhcpd.conf) and /etc/hosts file.

    For preparation, make sure that in /etc/fstab and in the /boot/grub/menu.lst, there are no physical addresses of hardware (e.g. a hard disk), as they will be different among the nodes. All hardware should be addressed by their subdirectory in /dev which you can see in the output when you type mount.

    I used low level R/W with dd and piping to and from netcat, respectively on machine to clone from and machine to clone to, as described in a howto. We clone using convert and copy (dd) and netcat (nc).

    On node1 you run:

    node1# dd if=/dev/hda conv=sync,noerror bs=64k | nc -l 5000

    On node2 you run:

    node2# nc 192.168.1.1 5000 | dd of=/dev/hda bs=64k

    where 192.168.1.1 is the ip of node1. This presupposes the disk of node2 is at least as big as node1′s.

    This took several hours time (it said 158GB read/written), but it worked.

  289. Anonymous said, on March 23, 2010 at 2:17 pm

    Emacs setting

    http://d.hatena.ne.jp/qnzm/20090118/1232256216

  290. Anonymous said, on March 24, 2010 at 12:24 am

    vtk Cutter
    http://www.itk.org/Wiki/VTK/Examples/vtkCutter

  291. Anonymous said, on March 25, 2010 at 10:52 am

    GUI key event

    http://ubuntuforums.org/showthread.php?t=1274541

  292. Anonymous said, on March 25, 2010 at 10:54 am

    I think using separate threads are a bad idea, as VTK is singly threaded.

    What you probably want to do is

    1) Use vtkRenderWindowInteractor::CreateRepeatingTimer to start a timer running in your interactor. 2) create your own class derived from vtkCommand, and have it observe vtkCommand::TimerEvent.

    Your class derived from vtkCommand will overload Execute(), and your Execute() will update the scene.

    Now it is possible to have separate threads, with one thread handling VTK, but you will have to serialize access to the VTK library from other threads. This is best managed with a message passing paradigm, in which case you’ll have to define message packets to cover all the VTK API calls you want to make. This is rather a big job.

  293. Anonymous said, on March 25, 2010 at 7:18 pm

    環境

    インストールするマシンは以下ようなネット接続で G/Wおよび、各種サーバ (WWW,Mail 等)として利用する
    よって、ローカル側からはipマスカレードを利用しインターネットにアクセスしインターネット側からはローカルネットへのアクセス禁止とG/W内部へのアクセスも必要以外のポートを禁止する。

    ———
    (インターネット)(eth1)| G/W |(eth0)(ローカルネット)
    ———

    ipchainsの停止

    ipchainsが動作しているときはこれを停止する

    /sbin/lsmod (確認コマンド)

    sis900 11264 1 (autoclean)
    ipchains 38976 0 (unused)
    ^^^^^^^^ /proc/sys/net/ipv4/ip_forward

    ##テーブルの条件を初期化する(ただしポリシーは変更できない)

    /sbin/iptables -t filter -F FORWARD
    /sbin/iptables -t filter -F INPUT
    /sbin/iptables -t nat -F POSTROUTING

    ##ipマスカレードの設定
    /sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

    ##ポリシーを決める(通過およびマシンが応答するパケットは基本的に禁止)
    /sbin/iptables -t filter -P FORWARD DROP
    /sbin/iptables -t filter -P INPUT DROP

    ##
    /sbin/iptables -t filter -A FORWARD -m state –state ESTABLISHE,RELATED -j ACCEPT

    ## pingの通過および応答を許可
    /sbin/iptables -t filter -A FORWARD -i eth0 -p icmp -j ACCEPT
    /sbin/iptables -t filter -A INPUT -i eth1 -p icmp -j ACCEPT

    ## DNS問い合わせの通過および応答を許可
    /sbin/iptables -t filter -A FORWARD -i eth0 -p udp –dport 53 -j ACCEPT
    /sbin/iptables -t filter -A INPUT -i eth1 -p udp –dport 53 -j ACCEPT

    ## wwwの通過および応答を許可
    /sbin/iptables -t filter -A FORWARD -i eth0 -p tcp –dport 80 -j ACCEPT
    /sbin/iptables -t filter -A INPUT -i eth1 -p tcp –dport 80 -j ACCEPT

    ## POPの通過および応答を許可
    /sbin/iptables -t filter -A FORWARD -i eth0 -p tcp –dport 110 -j ACCEPT
    /sbin/iptables -t filter -A INPUT -i eth1 -p tcp –dport 110 -j ACCEPT

    ## SMTPの通過および応答を許可
    /sbin/iptables -t filter -A FORWARD -i eth0 -p tcp –dport 25 -j ACCEPT
    /sbin/iptables -t filter -A INPUT -i eth1 -p tcp –dport 25 -j ACCEPT

    ## ftp通信用モジュールのロード(FTPの通過および応答を許可)
    /sbin/iptables -t filter -A FORWARD -i eth0 -p tcp –dport 21 -j ACCEPT
    /sbin/iptables -t filter -A INPUT -i eth1 -p tcp –dport 21 -j ACCEPT
    /sbin/modprobe ip_nat_ftp
    /sbin/modprobe ip_conntrack_ftp

    うまくいったら、/etc/rc.d/rc.localにでも書けばOK

  294. Anonymous said, on March 26, 2010 at 5:38 pm

    [vtkusers] [vtk-users] capture mouse event

    http://markmail.org/message/7p3ymbhw5dwhxxve#query:vtk AddObserver mouse+page:1+mid:42fcw5ufpv7gp6oi+state:results

  295. Anonymous said, on March 27, 2010 at 10:03 am

    http://home.hiroshima-u.ac.jp/tkura/linux/vi.html

    vi(nvi-m17n)
    —-
    vi

    open modeでfileが開かれた時は環境変数TERMを正しく設定してviを開く.
    commandの中止= Esc
    :sh (shellに入る) C-d (shellから出る)
    :e file (編集対象をfileに換る)

    (i又はa)+Shift+space = 日本語入力,Enterで確定

    ———-
    copy
    ———
    :3,5co20 (3行から5行までをcopyして20行の下に入れる)

    :3pu a (file B内の3行めの下にbuffer aをpaste)
    “ap (buffer名aをcursorの下の行にpaste)
    “aP (buffer名aをcursorの上の行にpaste)

    p (cursor行の下の行にpaste)
    p (cursor行の後にpaste)
    P (cursor行の上の行にpaste)
    P (cursor行の前にpaste)

    :4pu (4行目の下にpaste)

    ———-
    yank
    ———
    yw (cursorから1語をyank)
    y5w (cursorから5語をyank)
    yb (cursorから前1語をyank)
    y2b (cursorから前2語をyank)
    y$ (cursorから行末までをyank)
    yl (cursorから1字をyank)
    y2l (cursorから2字をyank)
    yh (cursorから前1字をyank)
    y2h (cursorから前2字をyank)
    y0 (cursorから行の先頭までをyank)
    :2,5y a (file A内の2行から5行までをbuffer aにyank)
    “ay5y (カレント行から5行をbuffer名aにyank)
    yy (cursor行をyank)
    y3y (cursor行を込めて下の3行をyank)
    y3k (cursor行を込めて上の4行をyank)
    yH (cursor行から画面の上までをyank)
    yL (cursor行から画面の下までをyank)
    yM (cursor行から画面の中央までをyank)

    マークで領域指定しての削除,yank
    (1)マークを付けたい先頭位置にカーソルを移動する。
    (2)ma (aはアルファベットなら何でもよい)
    (3)マークを付けたい終了位置の次の位置にカーソルを移動する。
    (削除)d`(バッククォート)aと入力又は (yank)y`(バッククォート)aと入力する.
    (mark aからcursor行まで削除)d’(クォート)aと入力又は (mark aからcursor行までyank)y’(クォート)aと入力する.
    buffer xに保存する場合はma”xd`a又はma”xy`a

    —————
    テキストの移動
    ————–

    :3,5m20 (3行から5行までを20行の下に移動する)

    ——————
    削除
    —————–
    dw (次の単語を削除)
    d5w (次の5語を削除)
    db (前の1単語を削除)
    d5b (前の5単語を削除)

    d0 (行頭まで)
    dH (画面の最初の行まで)
    d1G (先頭行まで)
    D (行末まで)
    d/pattern (pattern の直前まで)
    dL (画面の最後の行まで )
    dG (最終行まで)
    :m,nd (m行からn行まで削除)
    :nd (n行目を削除)

    削除部分の復元

    bufferの掃き出し

    ————–
    変更,表示
    ————-
    cw (カーソルの位置から1単語を変更)
    c3w (カーソルの位置から3単語を変更)
    ~ (大文字を小文字に変換し,小文字を大文字に変換)
    2~ (cursorから2文字を,大文字を小文字に変換し,小文字を大文字に変換)
    r (1文字のreplace)
    ^G (file情報を表示)
    := (行の総数を表示)
    :.= (current行の行番号を表示)
    :/pattern/= (patternにマッチする最初の行の行番号を表示)

    ———-
    undo
    ———
    “1pu…… (undoを繰り返す)
    u (直前の操作をundo)
    . (最後の編集コマンドの繰り返し)

    “1p… (1番から9番までのbufferを復元)

    ———————
    cursorの移動
    —————–
    k (上の1行移動)
    2k (上に2行移動)
    j (下の1行移動)
    2j (下の2行移動)
    h (左に1文字移動)
    2h (左に2文字移動)
    l (右に1文字移動)
    2l (右に2文字移動)
    $ (行末に移動)
    0 (行頭に移動)
    ^ (行の最初の文字に移動)
    _ (行の最初の文字に移動)
    - (直前の行の先頭に移動)
    + (直後の行の先頭に移動)
    w (次の単語に移動)
    2w (次の2単語に移動)
    b (後の単語に移動)
    2b (後の2単語に移動)
    H (画面の最上部に移動)
    M (画面の中央に移動)
    L (画面の最下位に移動)
    2H (画面上端から2行目に移動)
    2L (下端2行目に移動)
    nG (n行に移動)
    :n (n行に移動)
    G (fileの最後の行に移動)
    { (前の段落の先頭に移動)
    } (次の段落の先頭に移動)
    C-f (次の画面にscroll)
    C-b (前の画面にscroll)
    C-e (windowの下にもう一行表示)
    C-y (windowの上にもう一行表示)
    [[ (前のsectionの先頭に移動)

    ]] (次のsectionの先頭に移動)

    (2)insert mode
    C-f (cursorを右に移動)
    C-b (cursorを左に移動)
    C-p (cursorを上に移動)
    C-n (cursouを下に移動)
    (上は.exrcにmap!が設定してあるから可能)
    (.exrcで^Fの入力はC-v,C-fを打つ、^[の入力はC-v,Escを打つ)

    ----------------
    fileへの書き込み
    ----------------
    :10,20w newfile (10行目から20行目までをnewfileとしてsave)
    :10,$w newfile (10行目からfileの最後までをnewfileとしてsave)
    :.,10w newfile (カレント行から10行目までをnewfileとしてsave)

    ----------------
    file操作
    ---------------
    :r file (fileをカレント行の下に挿入)
    :e# (もう一方のfileの編集)
    :rew (編集対象が初めに編集したfileに戻る)
    :n (編集対象を次のfileに移す)
    C-^ (編集対象が直前のfileに戻る)
    :e file (fileを編集する)

    ---------------------------
    viのなかでUNIX commandを実行
    ----------------------------
    :!unix-command
    :sh &lt-> ^d (shell &lt-> vi)

    -------
    Texを使う
    -------
    xxx.texを編集
    :w
    map K :!platex xxx.tex (これを作業directoryの.exrc fileに書く)
    K
    :st
    xdvi xxx&
    fg
    (1)xxx.texを編集
    (2):w
    (3)K
    (1)-(3)を繰り返す。事前にKがvi commandでない事を確かめておく。

    -------
    その他
    -------
    ^x (backup fileの作成)

    J (2行の連結)

    日本語を入力して行数が表示していない時はfileをeucに変換して表示しなおす。

    ---------------
    fileのcode変換
    ---------------
    map q :set fileencoding=iso-2022-jp (q:wでfileがjisに変換)
    map g :set fileencoding=euc-jp (g:wでfileがeucに変換)
    :set fileecoding=sjis (:wでfileがsjisに変換)
    C-g (.exrcにset autodetect=jp+を入れたのでfile-code名を表示する)

    ------------------
    exのaddress symbol
    ------------------
    2,5 (2行目から5行目)
    0 (fileの先頭)
    . (current行)
    5 (5行目)
    $ (行末)
    % (全部の行)2,5 (2行目から5行目)
    0 (fileの先頭)
    . (current行)
    5 (5行目)
    $ (行末)
    % (全部の行)

    ---------------
    一括置換
    ---------
    :g と:s を使う。g=global,s=substitute
    :s/old/new/ (current行で初めのoldをnewに換る)
    :s/old/new/g (current行の全てのoldをnewに換る)
    :s/old/new/gc (:s/old/new/gを確認して行なう)
    :m,ns/old/new/ (m行からn行の各行について初めのoldをnewに換る)
    :m,ns/old/new/g
    :m,ns/old/new/gc
    :%s/old/new/

    :g/pattern/s/old/new/ (patternを含む行にある初めのoldをnewに換る)
    :g/pattern/s/old/new/g (patternを含む行にある全てのoldをnewに換る)
    :m,ng/pattern/s/old/new/ (m行からn行のpatternを含む行について初めのoldをnewに換る)
    :m,ng/pattern/s/old/new/g
    :m,ng/pattern/s/old/new/gc

    ------------
    一括置換の例
    ------------
    :s/a/b/ (current行で初めのaをbに換る。)
    :s/a/b/g (current行で全てのaをbに換る。)
    :s/a/b/gc (確認しながらcurrent行で全てのaをbに換る。)
    :2,5s/a/b/g (2行から5行の全てのaをbに換る。)

    :%s/$/xxx/ (fileの全ての行末にxxxを加える。)

    :%s/ // (全ての行で初めの空白を取る)
    :%s/^M//g (fileから^Mを取る。ここで^Mの入力はCtrl+v,Ctrl+mである)
    :3,20s/$/^M (3行から20行までにReturnを入れる.ここで^MはCtrl+v,Ctrl+Enter)
    :'a,'bs/^\(.....\).*/\1/ (mark aからbまでの行で行頭から6桁目以降を削除)
    :'a,'bs/^\(.\{5\}\).*/\1/ (mark aからbまでの行で行頭から6桁目以降を削除)

    mark aからmark bまでのNo2,No23,No3,No1234等をNo2sol,No23sol,No3sol,No1234solに換る
    :'a,'bs/No\([0-9]*\)/No\1sol/g

    :’a,’b!sort -n (‘aから’bまでを数値順に並べる)

    —————-
    Pattern match
    —————
    \ (aaaで終る語にmatch. daaaにはmatchする)

    ————-
    ex commands
    ————-
    :ar (読み込んだファイル名を表示 display the argument list)
    :[range]!arguments (shell commandを実行)
    :[range]nu (rangeを表示)
    :[range]< (rangeで定めた行を左にshift)
    : (rangeで定めた行を右にshift)
    :>5 (current行から下5行を右にshift)
    :di b (全てのbufferを表示)
    :E (windowの分割)
    :f aa (file名をaaに換る)
    :[range]g/pattern/[commands] (patternに一致する行にcommandを実行する)
    :[range]g!/pattern/[commands] (patternに一致しない行にcommandを実行する)
    :[range]l (rangeの範囲を表示)
    :[range]m5 (rangeの範囲を5行目に移動)
    :[range]p (rangeの範囲を表示)
    :prev (argument listで現在表示のfileの前のfileに戻る)
    :3pu a (3行目の下にbuffer aを置く。puはputの略)
    :res +5(-5) (+5はwindowサイズを5行増す.-5は5行減らす
    :rew (rewind the argument list読み込んだファイルの初めに戻る)
    :sh (shellを走らせる。解除は^d)
    :su (suspend.解除はfg)
    :st (stop. 解除はfg)
    :so file (source fileの略、file のcommandを実行)
    :ve (versionを表示)
    :!unix-command (unix commandを実行)
    :ve (versionを表示)
    :w aaa (現在のfileをaaaとしてcopy)
    :2,5w>>aaa (2行から5行までをfile aaaに追加する)
    :2,5w aaa (2行から5行までをfile aaaとして保存)

    :map (mapで定められている物を表示)

    ————-
    ex option
    ———–
    :set all (可能なoptionを表示)
    :set (設定されたopionを表示)
    :set filec=\(Tab) (filenameの補完.ここで(Tab)はTab keyを入力)

    ———
    検索
    ——-
    :/pattern (patternを含む初めの行に移動。次のpatternに移動はn,逆向きの移動はN)
    :?pattern (patternを含む最後の行に移動。上向きの移動はn,下向きの移動はN)
    :g/pattern (patternを含む全ての行を表示)

    Go to the Linux Page
    Go to the Kura’s Home Page

  296. Anonymous said, on March 27, 2010 at 2:26 pm

    http://www.fredosaurus.com/notes-cpp/newdelete/50dynamalloc.html

    C++ Notes: Dynamic Allocation of Arrays
    The problems with fixed size arrays

    Declaring an array with a fixed size like

    int a[100000];

    has two typical problems:

    * Exceeding maximum. Choosing a real maximum is often impossible because the programmer has no control over the size of the data sets the user is interested in. Erroneous assumptions that a maximum will never be exceeded are the source of many programming bugs. Declaring very large arrays can be extremely wasteful of memory, and if there are many such arrays, may prevent the program from running in some systems.
    * No expansion. Using a small size may be more efficient for the typical data set, but prevents the program from running with larger data sets. If array limits are not checked, large data sets will run over the end of an array with disastrous consequences. Fixed size arrays can not expand as needed.

    These problems can be avoided by dynamically allocating an array of the right size, or reallocating an array when it needs to expand. Both of these are done by declaring an array as a pointer and using the new operator to allocate memory, and delete to free memory that is no longer needed.

    This is exactly what is vector does, but let’s see how it’s done with an array.
    Declare array as a pointer, allocate with new

    To create a variable that will point to a dynamically allocated array, declare it as a pointer to the element type. For example,

    int* a = NULL; // pointer to an int, intiallly to nothing.

    A dynamically allocated array is declared as a pointer, and must not use the fixed array size declaration. The above declaration creates a pointer, but doesn’t yet allocate any memory to it.
    Allocate an array with code>new

    When the desired size of an array is known, allocate memory for it with the new operator and save the address of that memory in the pointer. Remember: Pointers may be subscripted just as arrays are. The example below reads in a number and allocates that size array.

    int* a = NULL; // Pointer to int, initialize to nothing.
    int n; // Size needed for array
    cin >> n; // Read in the size
    a = new int[n]; // Allocate n ints and save ptr in a.
    for (int i=0; i<n; i++) {
    a[i] = 0; // Initialize all elements to zero.
    }
    . . . // Use a as a normal array
    delete [] a; // When done, free memory pointed to by a.
    a = NULL; // Clear a to prevent using invalid memory reference.

    Freeing memory with delete

    When you are finished with dynamically allocated memory, free it with the delete operator. After memory is freed, it can be reused by later new requests. Memory that your program didn't free will be freed when the program terminates. Never free memory that wasn't dynamically allocated – the results are unpredictable.

    delete [] a; // Free memory allocated for the a array.
    a = NULL; // Be sure the deallocated memory isn't used.

    Use [] when deleting arrays

    You must specify "[]" when deleting an array, but not for a single value. It isn't possible to delete only part of an array.
    Do you have to reset a pointer after delete?

    Following the delete in these examples, I reset the pointer to NULL. This isn't strictly necessary, but it's very good practice so that any use of the pointer will produce an error. Attempts to use memory location 0, which is the normal default value of NULL, will be blocked by the way most operating systems allocate memory.

    Why doesn't delete reset the pointer? It does in some systems, but the language specification does not require it, so not all systems do it.
    Examples

    * Allocating C-Strings shows a typical example of allocating an array of a known size.
    * Expanding an Array shows how to expand the size of an array dynamically.

  297. Anonymous said, on March 30, 2010 at 5:05 pm

    Qt and Vtk

    http://www.twincling.org/node/486

  298. Anonymous said, on March 30, 2010 at 5:10 pm

    Qt is already capturing the events, but it delgates the processing of those events to vtkRenderWindowInteractor, which in turn works with vtkInteractorObservers.

    If you want to customize event processing, it is recommended that you make a vtkInteractorStyle class to do that, so that any other vtkInteractorObservers you decide to use will also work.

    Otherwise, if you really want to, just overload the normal QWidget functions for capturing events and process them yourself. Its just like any other QWidget.

    Clint

  299. Anonymous said, on March 30, 2010 at 5:26 pm

    Running a Subversion Server

    http://www.linuxfromscratch.org/blfs/view/svn/server/svnserver.html

  300. Anonymous said, on March 30, 2010 at 5:26 pm

    *******************************************************************
    Setup Guide for Linux Subversion Server, using SSH client access
    (using the svn+ssh protocol with svnserve -t)

    Gunther Strube (gbs@users.sourceforge.net, March 2004)
    *******************************************************************

    ——————————————————————
    0 Introduction
    ——————————————————————
    This Guide will explain in easy steps how to setup your Linux server
    working for Subversion repository access through SSH client access.

    The svn+ssh:// protocol enables you to use SSH client access is throught
    the password prompt or using public private keys validation.
    No Public/private key generation is necessary to use the simplified
    svn+ssh protocol, but it might be a good idea, so that you can avoid
    password prompts all the time when using the SVN client access.

    This guide assumes that you know how to setup SSH with public/private
    keys on the server and on your client, and that you already have
    installed Subversion on your Linux box.

    ——————————————————————
    1. Install OpenSSH and Subversion binaries (distribution dependend)
    ——————————————————————
    Install your binaries on the Linux server (rpm, tgz), following your
    distributions installation scheme. To get SSH access working you need
    to install the OpenSSH server package.

    Also remember:

    root user must NOT be allowed to use SSH access (usually default).
    Make sure that the SSH server is being started at boot (init-scripts)

    ——————————————————————
    2. Access restrictions to Subversion repositories
    ——————————————————————
    Using SSH in par with Subversion will only enable access to the
    Subversion repositories to users created and active on the server.
    To further restrict security, only those users (and root) can “work”
    on those files (as created by svnadmin), if logged on to the system
    (using the secure shell).

    To ensure a clean interface, a new group is created, called svnusers.
    Add users to this group that wants access to Subversion repositories.
    (Use your favorite GUI admin tool or the command line)

    All Subversion users should not be able to su to root (again for
    sake of security, compromising remote login and hacking the root password)

    ——————————————————————
    2.1 Default umask for Subversion users
    ——————————————————————
    When each Subversion user accesses the reposity database through SSH
    it is vital that the corresping user doesn’t destroy the group write
    permission during the SSH session (using the tunnelled svnserve command)
    Therefore, all Subversion users need an addition to their .bashrc file:

    umask 002 # allow user + group to write, no other.

    Please remember this also when creating new users (that needs Subversion
    access) on the server.

    ——————————————————————
    2.2 Create a svnadm user account
    ——————————————————————
    Create this user with your favorite GUI tool or adduser command, and
    add it to the svnusers group.

    This user is only for keeping a proper abstraction when working
    on the server. The svnadm user will of course be part of the
    svnusers group. This user should be used to create new Subversion
    projects, execute backup scripts, and work on general maintainance.

    As with all Subversion users, the additional entry to the .bashrc file:

    umask 002 # allow user + group to write, no other.

    ——————————————————————
    3. Create a root path for the Subversion repositories
    ——————————————————————
    Create a path in where we will next create our Subversion
    repositories (as root):

    mkdir -p /usr/share/subversion/repositories

    Next, we will restrict access to this area only for root and svn users:

    chown -R root.svnusers /usr/share/subversion/repositories
    chmod -R u+wrx,g+wrx,o-wxr /usr/share/subversion/repositories

    Make sure that you have read and execute permission for root and svnusers
    users in the above directory path (check all nodes of the path).

    ——————————————————————
    4. Creating a wrapper script for svnserve command
    ——————————————————————
    Using the svn+ssh protocol unfortunately discloses the absolute
    path of any Subversion project repository stored on the server’s file
    system. This is quite unfortunate due to security reasons. The purpose of
    this wrapper script is to hide the root directory on your server where you
    store all your Subversion repositories.

    First of all, rename the original svnserve command into svnserve.bin
    (it usually resides in /usr/bin/svnserve)

    Paste the following text into your favorite Linux editor and change
    the /path/to/repository/root to something useful, eg.:
    /usr/share/subversion/repositories

    Save the file as “svnserve”, being the root superuser.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    #!/bin/sh
    # wrap in order to put root in by default
    # Script implemented by Adrian Robert

    exec /usr/local/bin/svnserve.bin -r /path/to/repository/root “$@”
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    The -r option ensures that all URL specified paths (only the
    projects) will be appended to this root path. In other words this
    setup ensures that you only get access to repository projects inside
    the root path.

    The wrapper script must be executable (and readable) by all.
    Only root can write: chmod u+wrx,g+rx-w,o+xr-w svnserve

    ——————————————————————
    5. Creating a Subversion project repository
    ——————————————————————
    Finally, we’re ready to actually create a Subversion repository that
    can be accessed through the svn+ssh protocol. Use svnadm to do the
    job:
    su – svnadm (log into svnadm user)

    then use the svnadmin command to create a Subversion project:

    svnadmin create /usr/share/subversion/repositories/project1
    (“project1″ just being an example, choose your own name)

    finally, we need to remove the “other user” access of the new folder
    and contents (so that only svnusers have access):

    chmod -R o-rwx /usr/share/subversion/repositories/project1

    ——————————————————————
    5.1 Configuration of the Subversion project
    ——————————————————————
    Before we can open up for the world, we need to configure a few
    access settings in the project repository; nobody gets access to the
    repository, unless they are SSH authenticated (no anonymous access),
    and that the repository is enabled for write access for SSH
    authenticated users.

    cd /usr/share/subversion/repositories/project1/conf

    load the svnserve.conf into your favorite editor and add the following:

    [general]
    anon-access = none
    auth-access = write

    ——————————————————————
    6. Testing SSH client access (on localhost)
    ——————————————————————
    Log in to one of the svn users and try:

    svn list svn+ssh://@localhost/project1

    you should be prompted for a password (and if that’s successful),
    you just return back to the command line (because the newly created
    project is empty). This test ensures that the SSH server is running
    and that the svnserve tunneling is working.

    ——————————————————————
    7. Congratulations!
    ——————————————————————
    You’re now ready to play with Subversion on your remote clients, doing
    all the fun stuff with sub-versioning! Read the Subversion manual
    thoroughly and understand the concepts before going into hard core
    commit-mania!

    One advice; use SSH Public/private keys with a user-agent to cache your
    ssh passphrase otherwise you will get nuts typing your password over
    and over again when issuing all those ssh command sessions.

    There’s a quick soultion if you’re a TortoiseSVN user on Windows:

    Open Explorer file window, right-click in the file section (get a pop-up),
    choose: TortoiseSVN -> Settings -> “Network” Pane-> SSH Client.

    …\TortoisePlink.exe -l SSH_login_user_id -pw SSH_password

    (if you specify a user ID here, then remember to remove the user ID
    from the svn+ssh URL)

  301. Anonymous said, on March 31, 2010 at 2:28 pm

    Declare array as a pointer, allocate with new

    To create a variable that will point to a dynamically allocated array, declare it as a pointer to the element type. For example,

    int* a = NULL; // pointer to an int, intiallly to nothing.

    A dynamically allocated array is declared as a pointer, and must not use the fixed array size declaration. The above declaration creates a pointer, but doesn’t yet allocate any memory to it.
    Allocate an array with code>new

    When the desired size of an array is known, allocate memory for it with the new operator and save the address of that memory in the pointer. Remember: Pointers may be subscripted just as arrays are. The example below reads in a number and allocates that size array.

    int* a = NULL; // Pointer to int, initialize to nothing.
    int n; // Size needed for array
    cin >> n; // Read in the size
    a = new int[n]; // Allocate n ints and save ptr in a.
    for (int i=0; i<n; i++) {
    a[i] = 0; // Initialize all elements to zero.
    }
    . . . // Use a as a normal array
    delete [] a; // When done, free memory pointed to by a.
    a = NULL; // Clear a to prevent using invalid memory reference.

    Freeing memory with delete

    When you are finished with dynamically allocated memory, free it with the delete operator. After memory is freed, it can be reused by later new requests. Memory that your program didn't free will be freed when the program terminates. Never free memory that wasn't dynamically allocated – the results are unpredictable.

    delete [] a; // Free memory allocated for the a array.
    a = NULL; // Be sure the deallocated memory isn't used.

    Use [] when deleting arrays

    You must specify "[]" when deleting an array, but not for a single value. It isn't possible to delete only part of an array.
    Do you have to reset a pointer after delete?

    Following the delete in these examples, I reset the pointer to NULL. This isn't strictly necessary, but it's very good practice so that any use of the pointer will produce an error. Attempts to use memory location 0, which is the normal default value of NULL, will be blocked by the way most operating systems allocate memory.

    Why doesn't delete reset the pointer? It does in some systems, but the language specification does not require it, so not all systems do it.

  302. Anonymous said, on March 31, 2010 at 5:43 pm

    Subversionのサーバーをsvnserveで構築する

    http://it.kndb.jp/entry/show/id/1126

  303. Anonymous said, on April 3, 2010 at 7:32 am

    Matt’s Mini-HOWTO for Intel IPP and OpenCV on Linux.

    Here I describe how I got IPP and OpenCV going on Linux (Fedora Core
    4 and 5). It might be useful to you.

    1. IPP is the Intel Integrated Performance Primitives. It has
    functions optimized to run on Intel Processors, including the use
    of MMX (MultiMedia eXtensions) instructions, SSE (Streaming Single
    instruction multiple data Extensions), and SSE2. It is free for
    non-commercial use but is not open! It comes in 3 parts: signal
    processing, image processing, and small matrix calculations.

    I registered at Intel for the non-commercial version of the Integrated
    Performance Primitives. You have to wait for an email containing the
    information to download the package. Finally I was able to download
    l_ipp_ia32_p_5.0.043.tgz, a 120 MB archive. I unpacked the archive
    and installed it with

    tar xvzf l_ipp_ia32_p_5.0.043.tgz
    cd l_ipp_ia32_p_5.0.043
    ./install.sh (as root)

    I used the defaults. The serial number comes with the email message
    from Intel.

    So that the dynamic linker could find the shared libraries, I created
    a file /etc/ld.so.conf.d/local.conf containing

    /opt/intel/ipp/5.0/ia32/sharedlib

    then ran

    ldconfig -v

    (this only needs to be done once). The procedure may be different
    on OSes other than FC4/5.

    2. OpenCV is also from Intel but is free and open. It contains a ton
    of image processing and computer vision algorithms and the data
    structures necessary for those algorithms. It lacks some of the
    simple low-level things we like to do, though, so that’s why I
    also use IPP.

    I downloaded the following from sourceforge:

    CVPR01_course.zip (A tutorial from CVPR 2001)
    ippocv.pdf (Integration with IPP)
    opencv-0.9.7.tar.gz (Linux version)
    OpenCVReferenceManual.pdf (Reference manual)

    Installation instructions follow.

    1. tar xvzf opencv-0.9.7.tar.gz
    2. cd opencv-0.9.7
    3. ./configure # (fix any problems before going on)
    4. make # (ignore warnings but watch for errors)
    5. make install # (this has to be run as root)
    6. Add /usr/local/lib to /etc/ld.so.conf.d/local.conf
    7. ldconfig -v # (this has to be run as root)

  304. Anonymous said, on April 5, 2010 at 5:31 pm

    vtk VectorOfActors
    http://www.cmake.org/Wiki/VTK/Examples/VectorOfActors

  305. Anonymous said, on April 9, 2010 at 12:42 am

    http://wordassociation1.net/manifold.html

  306. Anonymous said, on April 13, 2010 at 11:37 am

    Recursively remove all .svn directories

    find . -name .svn -exec rm -rf {} \;

    find . -name .svn -print0 | xargs -0 rm -rf

    Use this for all unixes:

    rm -rf `find . -name .svn`

  307. Anonymous said, on April 14, 2010 at 5:04 pm

    Centos install

    http://tmcosmos.org/linux/centos/co5.html

  308. Anonymous said, on April 15, 2010 at 12:29 pm

    #define VTK_CREATE(type, var) \
    vtkSmartPointer var = vtkSmartPointer::New()

  309. Anonymous said, on April 15, 2010 at 12:46 pm

    TestTilingCxx.cxx

  310. Anonymous said, on April 16, 2010 at 8:00 am

    linux kernal
    http://jungla.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html

  311. Anonymous said, on April 17, 2010 at 1:24 pm

    virtual void playball(int opt) = 0; // 一般原則の定義
    virtual void playball(int opt) {}; // 一般原則の具体化(場面に応じて修正可)
    void playball(int opt) {}; // 一般原則の具体化(修正不可)

     これらはすべて関数ですが、異なる名称が与えられています。上から、純粋仮想関数、仮想関数、通常関数、と呼ばれています

  312. Anonymous said, on April 17, 2010 at 1:28 pm

    http://www.ttoyota.com/philosophyofcpp/no1cpp18.php

    Stroustrup氏は、これまでの連載で何度も触れている1994年発行の「The Design and Evolution of C++」の中で、”ヘーゲルやマルクスの抽象的なヒューマニズムより、キルケゴールのきわめて個人的な心理学的洞察の方が感動的である”と述べています。キルケゴールというのは、Stroustrup氏と同じデンマーク生まれの哲学者です。この哲学者には、”死に至る病”という著作物があります。筆者はその著を読んだことはないのですが、もしかすると、”クラスが構築子と消滅子を持つことの意味”はノルウェーやデンマークなどの、いわゆる北欧文化圏を背景にして生まれてきたものではないかと想像しています。皆さんご存知のLinuxの創始者であるLinusさんは北欧のフィンランドで生まれています。考えてみると、私たちは北欧文化のことをほとんど学んでいません。基地局のエリクソン、携帯のノキアやオープンソースのMySQLなども北欧文化圏の中から生まれています。

  313. Anonymous said, on April 23, 2010 at 7:08 pm

    Latex page setting

    \usepackage[margin=2.5cm,left=2cm,right=2cm]{geometry}
    \input{dummy}
    \renewcommand{\baselinestretch}{1.5}

  314. Anonymous said, on April 24, 2010 at 4:59 pm

    int i; i as an int
    int *i; i as a pointer to an int
    int **i; i is a pointer to a pointer to an int
    int *(*i)(); i is a pointer to a function returning a
    pointer to int
    int *(*i[])(); i is an array of pointers to functions
    returning pointers to an int
    int *i[5]; i is an array of 5 pointers to int
    int (*i)[5]; i is a pointer to an array of 5 ints
    int *i(); i is a function returning a pointer to an int
    int (*i)(); i is a pointer to a function returning int
    int *(*(*i)())[5] i is a pointer to a function returning a
    pointer to an array of 5 pointers to an int

  315. Anonymous said, on April 24, 2010 at 5:50 pm

    string path = argc>1? argv[1]: “.”;

  316. Anonymous said, on April 24, 2010 at 7:42 pm

    // list::sort
    #include
    #include
    #include
    #include
    using namespace std;

    // comparison, not case sensitive.
    bool compare_nocase (string first, string second)
    {
    unsigned int i=0;
    while ( (i<first.length()) && (i<second.length()) )
    {
    if (tolower(first[i])tolower(second[i])) return false;
    ++i;
    }
    if (first.length()<second.length()) return true;
    else return false;
    }

    int main ()
    {
    list mylist;
    list::iterator it;
    mylist.push_back (“one”);
    mylist.push_back (“two”);
    mylist.push_back (“Three”);

    mylist.sort();

    cout << "mylist contains:";
    for (it=mylist.begin(); it!=mylist.end(); ++it)
    cout << " " << *it;
    cout << endl;

    mylist.sort(compare_nocase);

    cout << "mylist contains:";
    for (it=mylist.begin(); it!=mylist.end(); ++it)
    cout << " " << *it;
    cout << endl;

    return 0;
    }

  317. Anonymous said, on April 24, 2010 at 9:29 pm
    #include "home.h"
    
    string Templates::getTemplates()
    {
        string all_templates; //Set the string that will be returned
    	
        char *home_path;
        home_path = getenv("USERPROFILE"); //Get the user's home directory
    	string home = home_path;  //Convert to std::string
    	string template_path = home + "\\Templates";  //Add Templates directory to the end of home directory
    	
    	const char *template_dir = template_path.c_str();  //Convert back to a const char
    	
    	DIR *directory = NULL;
    	directory = opendir(template_dir);  //Open the resulting directory
    	struct dirent *entry = NULL;
    	
        if (directory == NULL)
        {
        }
    
        while (entry = readdir(directory))
        {
            if (entry == NULL)
            {
            }
    		all_templates = all_templates + entry-&gt;d_name + "\n";  //Add all the values into one string
        }
        closedir (directory);
    	return all_templates;
    }
    
    
  318. Anonymous said, on April 24, 2010 at 9:30 pm

    while (entry = readdir(directory))
    {
    if( strcmp( entry->d_name, “.” ) && strcmp( entry->d_name, “..” ) )
    //Add all the values into one string
    all_templates = all_templates + entry->d_name + “\n”;
    }

  319. Anonymous said, on April 26, 2010 at 7:42 pm

    cin.get(); // wait

  320. Anonymous said, on April 27, 2010 at 8:45 pm

    http://www.bugman123.com/Physics/Physics.html

  321. Anonymous said, on May 8, 2010 at 7:22 pm

    Gnuplot
    http://www.duke.edu/~hpgavin/gnuplot.html

  322. Anonymous said, on May 18, 2010 at 7:12 pm

    python line read

    http://www.yukun.info/blog/2008/06/python-file.html

  323. Anonymous said, on May 19, 2010 at 4:21 pm

    Read about numpy, scipy :
    http://numpy.scipy.org/

    # yum -y install numpy scipy python-devel openmpi-devel

  324. Anonymous said, on May 19, 2010 at 7:16 pm

    numpy と scipy のインストール方法を備忘録的に。

    ソースからコンパイルしても良いが、簡単なのでバイナリで
    http://download.opensuse.org/repositories/home:/ashigabou/
    にアクセスして自分のディストリビューションにあったものをダウンロード。

    scipyをインストールするにはnumpyが必要となる。

    refblas3-3.0-11.2.x86_64.rpm
    lapack3-3.0-19.2.x86_64.rpm
    python-numpy-1.2.0-1.3.x86_64.rpm
    python-scipy-0.6.0-2.5.x86_64.rpm

    の順でインストール

    wget http://download.opensuse.org/repositories/home:/ashigabou/CentOS_5/x86_64/

    sudo rpm -ihv xxxxxxxxx.rpm でインストール

  325. Anonymous said, on May 19, 2010 at 7:16 pm

    numpy と scipy のインストール方法を備忘録的に。

    ソースからコンパイルしても良いが、簡単なのでバイナリで
    http://download.opensuse.org/repositories/home:/ashigabou/
    にアクセスして自分のディストリビューションにあったものをダウンロード。

    scipyをインストールするにはnumpyが必要となる。

    refblas3-3.0-11.2.x86_64.rpm
    lapack3-3.0-19.2.x86_64.rpm
    python-numpy-1.2.0-1.3.x86_64.rpm
    python-scipy-0.6.0-2.5.x86_64.rpm

    の順でインストール

    sudo rpm -ihv xxxxxxxxx.rpm でインストール

  326. Python script said, on May 22, 2010 at 12:36 pm
    #!/usr/bin/env python
    import os
    import sys
    import time
    import string
    from numpy import *
    from time import strftime
    
    def printList(L):
    	for index, item in enumerate(L):
    		print index, item
    	return 0
    
    
    def mean(nums):
    	if len(nums):
    		return float( sum(nums) / len(nums))
    	else:
    		return 0.0
    
    
    os.system("rm -f *.txt")
    file.close()
    file = open(filename, 'r')
    data = file.read()
    file.close()
    data = data.split('\n')
    
    file= open(outfile, 'w')
    print &gt;&gt; file, data
    file.close()
    
    currenttime=strftime("Day.%Y.%b.%d_Time.%H.%M.%S", time.localtime())
    
    
  327. Anonymous said, on May 22, 2010 at 2:36 pm

    Python – Remove empty lines from text file
    print ”.join(line for line in open(“somefile”).readlines() if not line.isspace())

  328. Anonymous said, on May 22, 2010 at 9:32 pm

    convert -density 300 -resize 640×480 sin.eps sin.png

  329. gnuplot said, on May 27, 2010 at 7:39 pm
    
    #set term postscript enhanced color solid 10 "Times-Roman" 20
    #set term postscript enhanced color solid 10 "Ryumin-Light-EUC-H" 20
    
    #set term postscript enhanced color solid 10 "GothicBBB-Medium-EUC-H" 16
    set term postscript enhanced color solid 10 "Helvetica" 15
    #set term postscript eps enhanced color solid 10 "Helvetica" 15
    #set term png size 1024, 768 "Times-Roman" 28
    #set term postscript enhanced color 
    set output "Out.ps"
    
    set style line 1 lt 1 lw 10
    set style line 2 lt 2 lw 10
    set style line 3 lt 3 lw 10
    set style line 4 lt 4 lw 10
    set style line 5 lt 5 lw 10
    set style line 6 lt 6 lw 10
    
    set style line 7 lt 7 lw 10
    set style line 8 lt 7 lw 10
    set style line 9 lt 7 lw 10
    
    
    #set title "A \n 対するB" font "GothicBBB-Medium-EUC-H,24"
    
    
    set pointsize 2
    
          unset log  
          unset label 
    	set logscale y
    	set logscale x
    
          set xtic auto
          set ytic auto
          set mxtics 1
          set mytics 10
          set grid
          set xlabel "Number" font "Helvetica-Bold,22" 0.0,0.0
          set ylabel "Speed" font "Helvetica-Bold,22"
          set key left top
    set xr [1:10]
    set yr [1:10]
    
    #set label 7 "Label," at 2.5,1.9,1 font "Helvetica-Bold,15"
    #set arrow 1 from 6.1,5.9 to  6.1,6.6 lw 1 lt 1
    
    #plot "./tmp.txt" using 1:(1/($3/110.374)) notitle with points 1 5, "./tmp.txt" using 1:(1/($3/11.4)) notitle  with lines ls 1
    
    
  330. Anonymous said, on May 30, 2010 at 11:16 pm

    I’m using an AMD64 bit version of Linux. Can I use the Brother Linux printer drivers?

    Yes. Our drivers are created and optimized for 32 bit version of Linux,
    but those can be used for 64 bit Linux also. Some additional steps are required.

    For rpm users:
    1. After the driver installation, and if there is “/usr/lib64/filter/”, copy the file which name starts with “brlpdwrapper” ( in the “/usr/lib/cups/filter/” ) to “/usr/lib64/cups/filter/”.
    Or confirm there are symbolic links between “/usr/lib/” and “/usr/lib64/”.

    For dpkg users:
    1. Install lib32stdc++6(Debian) or ia32-libs(Ubuntu)
    2. Restart the system
    3. Use “–force-architecture” option when you install the drivers.
    4. After the driver installation, and if there is “/usr/lib64/filter/”, copy the file which name starts with “brlpdwrapper” ( in the “/usr/lib/cups/filter/” ) to “/usr/lib64/cups/filter/”.
    Or confirm there are symbolic links between “/usr/lib/” and “/usr/lib64/”.

  331. Anonymous said, on May 31, 2010 at 3:11 pm

    Qt designer

    http://doc.qt.nokia.com/2.3/designer/chap1_1.html

  332. Anonymous said, on June 7, 2010 at 10:29 pm

    http://www.cplusplus.com/doc/tutorial/files/

  333. Anonymous said, on June 9, 2010 at 6:30 pm

    fortran tutorial
    http://www-uxsup.csx.cam.ac.uk/courses/Fortran/

  334. Anonymous said, on June 10, 2010 at 12:14 am

    // ソースコード “c:\src\xxx.c” をコンパイルした場合。
    int main( void )
    {
    printf( “%s\n”, __FILE__ );

    return 0;
    }//main

  335. Anonymous said, on June 10, 2010 at 12:17 am

    // 2005年1月3日23時59分55秒にコンパイルした場合。
    int main( void )
    {
    printf( “%s %s\n”, __DATE__, __TIME__ );

    return 0;
    }//main

  336. Anonymous said, on June 10, 2010 at 12:41 am

    Tip 4: Calling a Function Before Program’s Startup

    class Logger
    {
    public:
    Logger()
    {
    activate_log();
    }
    };
    Logger log; /*global instance*/

    int main()
    {
    record * prec=read_log();
    //.. application code
    }

  337. Anonymous said, on June 10, 2010 at 12:42 am

    Tip 3: Comma-Separated Expressions

    int j=10;
    int i=0;
    while( ++i, –j)
    {
    /*..repeat as long as j is not 0*/
    }

  338. Dynamic Array said, on June 10, 2010 at 12:54 am
    
    int main()
    {
    	int i, j, k;
    	int n = 5;		// 配列の大きさ
    	int	*a,			// 1次元配列
    		**b,		// 2次元配列
    		***c;		// 3次元配列
    	
    	// 領域の確保と初期化 (1次元配列)
    	a = new int [n];
    	for( i=0; i < n; i++ )
    		a[i] = 0;
    	
    	// 領域の確保と初期化 (2次元配列)
    	b = new int *[n];
    	for( i=0; i < n; i++ ) {
    		b[i] = new int [n];
    		
    		for( j=0; j < n; j++ )
    			b[i][j] = 0;
    	}
    	
    	// 領域の確保と初期化 (3次元配列)
    	c = new int **[n];
    	for( i=0; i < n; i++ ) {
    		c[i] = new int *[n];
    		
    		for( j=0; j < n; j++ ) {
    			c[i][j] = new int [n];
    			
    			for( k=0; k < n; k++ )
    				c[i][j][k] = 0;
    		}
    	}
    	
    	
    	cout << "1次元配列 a:\n";
    	for( i=0; i < n; i++ )
    		cout << a[i] << "\t";
    	cout << "\n";
    	
    	cout << "2次元配列 b:\n";
    	for( i=0; i < n; i++ ) {
    		for( j=0; j < n; j++ )
    			cout << b[i][j] << "\t";
    		
    		cout << "\n";
    	}
    	
    	return 0;
    }
    
    
    
  339. Anonymous said, on June 17, 2010 at 1:32 am

    CUDA matrix multiplication

    cs.boisestate.edu/~tcole/cs498/spr09/presentations/cuda-AlanAndrews.ppt

  340. Anonymous said, on June 17, 2010 at 3:30 pm

    Device 0: “GeForce GTX 285″
    CUDA Driver Version: 3.0
    CUDA Runtime Version: 2.30
    CUDA Capability Major revision number: 1
    CUDA Capability Minor revision number: 3
    Total amount of global memory: 2147155968 bytes
    Number of multiprocessors: 30
    Number of cores: 240
    Total amount of constant memory: 65536 bytes
    Total amount of shared memory per block: 16384 bytes
    Total number of registers available per block: 16384
    Warp size: 32
    Maximum number of threads per block: 512
    Maximum sizes of each dimension of a block: 512 x 512 x 64
    Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
    Maximum memory pitch: 2147483647 bytes
    Texture alignment: 256 bytes
    Clock rate: 1.48 GHz
    Concurrent copy and execution: Yes
    Run time limit on kernels: Yes
    Integrated: No
    Support host page-locked memory mapping: Yes
    Compute mode: Default (multiple host threads can use this device simultaneously)

    Test PASSED

    Press ENTER to exit…

  341. Anonymous said, on June 18, 2010 at 6:43 pm

    fourier transform
    http://www.arachnoid.com/signal_processing/dft.html

  342. Anonymous said, on June 28, 2010 at 5:48 pm

    CUDA, Supercomputing for the Masses: Part 15

  343. Anonymous said, on June 28, 2010 at 8:33 pm

    http://www.vizworld.com/dox/CUDA06152009.pdf

  344. Anonymous said, on July 2, 2010 at 6:53 pm

    http://d.hatena.ne.jp/pippo21/20090603/1244028954

  345. Anonymous said, on July 3, 2010 at 9:14 pm

    Here is the quick and very easy fix to remove GRUB and get Windows working again. These instructions are from Microsoft’s site but with my own added tips for a brainless recovery:

    1. Put the Windows Vista installation disc in the disc drive, and then start the computer (set to boot from CD in BIOS).

    2. Press a key when you are prompted.

    3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.

    4. Click Repair your computer.

    5. Click the operating system that you want to repair (Vista in this case), and then click Next.

    6. In the System Recovery Options dialog box, click Command Prompt.

    7. Once in the command prompt, type exactly Bootrec.exe /FixMbr and then press ENTER. You will see “operation completed successfully.”

    8. Reboot and set BIOS to boot from the HDD again.

  346. Anonymous said, on July 6, 2010 at 12:04 pm

    ldd libcuda.so

    http://gpgpu.univ-perp.fr/index.php/Barra_Troubleshooting

  347. Anonymous said, on July 6, 2010 at 12:49 pm

    invalid device symbol when copying to constant memory
    http://forums.nvidia.com/index.php?showtopic=96582

  348. Anonymous said, on July 6, 2010 at 11:29 pm

    Wake on lan

    As far as I’ve managed to ascertain the two programs in the Ubuntu Repos that deal with wake on lan (wakeonlan and etherwake) don’t have any ability to use hostnames rather than IP Addresses to wake over the internet; if you’ve got an external IP that often changes (as some ISPs provide) then you’ll want to use a dynamic DNS service and a hostname.

    As such, I’ve written the following bash script:

    Code:

    #!/bin/bash
    SERVERIP=$(host HOSTNAME | grep -o -P “(:?\d+.?){4}”)
    wakeonlan -i $SERVERIP HWADDRESS
    exit

    where HOSTNAME is your hostname and HWADDRESS is the MAC Address of the box you want to wake. You’ll also need to forward port 9 on your router so that it will send the wakeonlan signal to the right place (this is the broadcast address for most routers but some may have another method if they don’t allow you to forward to the broadcast address).

  349. Anonymous said, on July 6, 2010 at 11:44 pm

    Geek to Live: How to assign a domain name to your home web server

  350. Anonymous said, on July 7, 2010 at 11:18 am

    Density
    convert -density 1000×1000 -rotate 90 -resize 1024×768 bw.ps bw.png

  351. Anonymous said, on July 7, 2010 at 11:40 am

    set title “Title”
    set yrange [0:150]
    set xrange [0:65]
    set xlabel “X Label”
    set ylabel ” Y Label”
    set xtic auto
    set ytic auto
    set mxtics 1
    set mytics 5
    set grid
    set xtics (“8″ 8, “16″ 16, “24″ 24,”32″ 32,”40″ 40, “48″ 48,”56″ 56, “64″ 64)
    plot “file.txt” using 1:2 title “” with linespoints 3

    set term postscript enhanced color solid 10 “Helvetica” 15
    #set xtics (“8″ 8, “16″ 16, “24″ 24,”32″ 32,”40″ 40, “48″ 48,”56″ 56, “64″ 64) font “Helvetica-Bold,15″
    #set terminal postscript portrait enhanced mono dashed lw 1 “Helvetica” 14
    #set terminal postscript
    set output “file.ps”
    #replot
    #set terminal png
    #set output “file.png”
    plot “bw.txt” using 1:2 title “C2050″ with linespoints 3
    #replot
    #set terminal X11
    #display “file.ps”
    pause -1

  352. Anonymous said, on July 7, 2010 at 11:42 am

    AWK file extract

    #!/bin/awk -f
    {
    print $5, $8
    }

  353. Anonymous said, on July 8, 2010 at 8:28 am

    Cuda error: Kernel execution failed:uncorrectable ECC error encountered

  354. Anonymous said, on July 13, 2010 at 5:54 pm

    Cuda programing

    Register variable reuse – Save register space
    Check CUDA runtime errors
    cutilCheckMsg
    cudaGetLastError
    cutilCheckError
    cutilSafeCall
    Select the appropriate compiling options

  355. Anonymous said, on July 14, 2010 at 1:06 am

    cuda opengl
    http://sssiii.seesaa.net/article/155323098.html

  356. Anonymous said, on July 14, 2010 at 2:10 pm

    vtk point select

    http://public.kitware.com/pipermail/vtkusers/2004-April/073344.html

  357. Anonymous said, on July 14, 2010 at 6:01 pm

    C言語でif関数に相当するものに条件演算子(三項演算子)があります。

    条件式 ? 式1 : 式2;

    条件式が真ならば、式1が返され、偽ならば式2が返されます。具体例を見てみましょう。

    cnt = (cnt < 100) ? cnt + 1 : 0;

  358. Anonymous said, on July 21, 2010 at 12:36 pm

    共有ライブラリ

    http://www.linux.or.jp/JF/JFdocs/Program-Library-HOWTO/shared-libraries.html

  359. Anonymous said, on July 22, 2010 at 12:50 am

    IPA font

    http://openbooth.org/archives/43.html

  360. Anonymous said, on July 22, 2010 at 1:21 am

    IPA

    http://www.pixture.com/drupal/ja/free-japanese-font-2

  361. Anonymous said, on July 23, 2010 at 12:39 am

    CentOS setting

    http://tmcosmos.org/linux/centos/co5.html

  362. Anonymous said, on July 23, 2010 at 1:50 am

    IPA ubuntu setting

    http://jody.sci.hokudai.ac.jp/~ike/blog/2008/09/ubuntu_804ipa.html

  363. Anonymous said, on July 23, 2010 at 11:21 am

    明朝体: serif  IPA P明朝
    ゴシック体:sans_serif IPA Pゴシック
    等幅:monospace  IPA UIゴシック

  364. Anonymous said, on July 23, 2010 at 12:27 pm

    CenOS install
    http://www.db.is.kyushu-u.ac.jp/computer/linux/install.html

  365. Anonymous said, on July 23, 2010 at 5:24 pm

    master:/opt on /opt type nfs (rw,addr=192.168.2.10)
    master:/usr/local on /usr/local type nfs (rw,addr=192.168.2.10)
    master:/home on /home type nfs (rw,addr=192.168.2.10)

  366. Anonymous said, on July 27, 2010 at 6:54 pm

    gnuplot stricks
    http://gnuplot-tricks.blogspot.com/

  367. Anonymous said, on July 28, 2010 at 1:27 pm

    Calling Fortran routines from a C++ program in Unix

  368. Anonymous said, on July 28, 2010 at 5:26 pm

    http://www.mofeel.net/849-comp-lang-fortran/12.aspx

  369. Anonymous said, on July 28, 2010 at 6:20 pm

    http://www.fortran.bcs.org/2002/interop.htm

  370. Anonymous said, on July 29, 2010 at 2:09 am

    reset
    f(x, a, b, c) = a*exp(-(x-b)*(x-b)/c/c)
    A = 0.6; B = 0.5; C = 0.2; D=0.5
    unset key; unset colorbox; unset xtics; set pm3d map
    set yrange [0:1.1]
    set parametric; set urange [0:1]; set vrange [0:1]
    set xrange [0:5.500000]
    set multiplot
    set isosamples 100, 100
    set palette model HSV functions 2.0/3.0, 0.4-0.4*gray, (4.0+2.0*gray)/6.0
    splot 5.500000*u, 1.1*v, 2*u+v w pm3d
    set isosamples 2, 2
    set palette model HSV function 1.000000, 1.0-f(gray, A, B, C), (1.0+2.0*f(gray, A, B, C))/3.0
    splot D*u+0.500000,0.000000+0.250000*v,u w pm3d,\
    D*u+1.500000,0.000000+0.188679*v,u w pm3d,\
    D*u+2.500000,0.000000+0.303030*v,u w pm3d,\
    D*u+3.500000,0.000000+0.255319*v,u w pm3d,\
    D*u+4.500000,0.000000+0.307692*v,u w pm3d
    unset ytics; unset ylabel
    set palette model HSV function 0.750000, 1.0-f(gray, A, B, C), (1.0+2.0*f(gray, A, B, C))/3.0
    splot D*u+0.500000,0.250000+0.500000*v,u w pm3d,\
    D*u+1.500000,0.188679+0.207547*v,u w pm3d,\
    D*u+2.500000,0.303030+0.181818*v,u w pm3d,\
    D*u+3.500000,0.255319+0.510638*v,u w pm3d,\
    D*u+4.500000,0.307692+0.403846*v,u w pm3d
    set label 1 “First” at 0.500000, -0.2 rotate by 45
    set label 2 “Second” at 1.500000, -0.2 rotate by 45
    set label 3 “Third” at 2.500000, -0.2 rotate by 45
    set label 4 “Fourth” at 3.500000, -0.2 rotate by 45
    set label 5 “Fifth” at 4.500000, -0.2 rotate by 45
    set palette model HSV function 0.500000, 1.0-f(gray, A, B, C), (1.0+2.0*f(gray, A, B, C))/3.0
    splot D*u+0.500000,0.750000+0.250000*v,u w pm3d,\
    D*u+1.500000,0.396226+0.603774*v,u w pm3d,\
    D*u+2.500000,0.484848+0.515152*v,u w pm3d,\
    D*u+3.500000,0.765957+0.234043*v,u w pm3d,\
    D*u+4.500000,0.711538+0.288462*v,u w pm3d
    unset multiplot

    pause -1

  371. Anonymous said, on July 29, 2010 at 2:18 am

    #!/bin/bash

    gawk ‘BEGIN {i=0; max=0}
    {
    if($0!~/#/) {
    label[i] = $1
    for(j=2;j<=NF;j++) {
    v[i,j-1] = $j
    if(max<v[i,j-1]) max=v[i,j-1]
    }
    i++
    }
    }
    END {
    print "reset"
    print "f(x, a, b, c) = a*exp(-(x-b)*(x-b)/c/c)"
    print "A = 0.6; B = 0.5; C = 0.2"
    print "unset key; unset colorbox; unset xtics; set pm3d map"
    printf "set yrange [0:%f]\n", max
    printf "set parametric; set urange [0:%f]; set vrange [0:1]\n", 1.0/(j-1)
    printf "set xrange [0:%d]\n", i+1
    print "set multiplot"
    print "set isosamples 100, 100"
    print "set palette model HSV functions 2.0/3.0, 0.4-0.4*gray, (4.0+2.0*gray)/6.0"
    printf "splot %d*u, %f*v, 2*u+v w pm3d\n", (i+1)*(j-1), max
    print "set isosamples 100, 2"
    for(l=1;l<j-1; l++) {
    if(l==j-2) {
    for(k=0;k1) print “unset ytics; unset ylabel”
    printf “set palette model HSV function %f, 1.0-f(gray, A, B, C), (1.0+2.0*f(gray, A, B, C))/3.0\n”, 1.0/l
    printf “splot ”
    for(k=0;k<i;k++) {
    printf "u+%f,%f*v,u w pm3d,\\\n", k+l/(j-1), v[k,l]
    }
    printf "u+%f,%f*v,u w pm3d\n", i+l/j, v[i,l]
    }
    print "unset multiplot"

    }' $1

    data file:

    First 1.0 2.0 1.0
    Second 1.0 1.1 3.2
    Third 2.0 1.2 3.4
    Fourth 1.2 2.4 1.1
    Fifth 1.6 2.1 1.5

    sh plot.sh data
    gnuplot plot.plt

  372. Anonymous said, on July 29, 2010 at 1:21 pm

    fortran cublas
    http://www.pgroup.com/userforum/viewtopic.php?t=2030

  373. Anonymous said, on July 30, 2010 at 12:18 am

    gnuplot strick

    http://www.phyast.pitt.edu/~zov1/gnuplot/html/histogram.html

  374. Anonymous said, on July 30, 2010 at 12:36 pm

    fortran cuda C pointer

    http://cudamusing.blogspot.com/

  375. Anonymous said, on July 30, 2010 at 3:19 pm

    C+Fortran
    http://www.nsc.liu.se/wg25/mlpcode/

  376. Anonymous said, on July 30, 2010 at 4:08 pm

    float *a, *b, *c; ! !// host pointers!
    float *a_d, *b_d, *c_d; !// device pointers!
    stat = cublasAlloc(n*n, sizeof(float), (void **)&a_d);!
    assert(stat == CUBLAS_STATUS_SUCCESS);!
    . . .!
    stat = cublasSetMatrix(n,n,sizeof(float),(void *)a,n,!
    ! ! ! (void *)a_d,n);!
    assert(stat == CUBLAS_STATUS_SUCCESS);!
    . . .!
    cublasSgemm(‘n’,’n’,n,n,n,alpha,a_d,n,b_d,n,beta,c_d,n);!
    cudaThreadSynchronize();!
    stat = cublasGetError();!
    assert(stat == CUBLAS_STATUS_SUCCESS);!
    stat = cublasGetMatrix(n,n,sizeof(float),c_d,n,c,n);!
    assert(stat == CUBLAS_STATUS_SUCCESS);

  377. Anonymous said, on July 30, 2010 at 7:32 pm

    http://forums.nvidia.com/index.php?showtopic=172403 [+]

  378. Anonymous said, on July 31, 2010 at 1:43 pm

    program average

    ! Read in some numbers and take the average
    ! As written, if there are no data points, an average of zero is returned
    ! While this may not be desired behavior, it keeps this example simple

    implicit none

    real, dimension(:), allocatable :: points
    integer :: number_of_points
    real :: average_points=0., positive_average=0., negative_average=0.

    write (*,*) “Input number of points to average:”
    read (*,*) number_of_points

    allocate (points(number_of_points))

    write (*,*) “Enter the points to average:”
    read (*,*) points

    ! Take the average by summing points and dividing by number_of_points
    if (number_of_points > 0) average_points = sum(points) / number_of_points

    ! Now form average over positive and negative points only
    if (count(points > 0.) > 0) then
    positive_average = sum(points, points > 0.) / count(points > 0.)
    end if
    if (count(points 0) then
    negative_average = sum(points, points < 0.) / count(points < 0.)
    end if

    deallocate (points)

    ! Print result to terminal
    write (*,'(a,g12.4)') 'Average = ', average_points
    write (*,'(a,g12.4)') 'Average of positive points = ', positive_average
    write (*,'(a,g12.4)') 'Average of negative points = ', negative_average

    end program average

  379. Anonymous said, on August 1, 2010 at 3:54 pm

    http://blog.srengine.com/2008/04/dvdipod-touchubuntudvdmp4k9copy-winff.html

    DVDをiPod Touchで視聴可能なmp4に変換する方法。

    まず、DVDをリッピングするのに必要なソフトk9copyをインストールする。

    # sudo apt-get install k9copy

    WinFFも後で必要になる。以下を参考に

    DVDを挿入するとツリー上にコンテンツが現れる。
    チェックをすべてに入れる。
    Settings→Configure k9copy→MPEG-4
    Codec:MPEG-4 (DivX 4/5)
    Audio:mp3
    OKボタンを押して、Create MPEG-4ボタンを押す。

    保存先を聞かれるので、ファイル名に.divxを付けてSaveボタンを押す。

    コンバートが終了したら、WinFFを起動してAddで先ほど作成したdivxファイルを指定する。
    Convert toにはH.264 iPod Linux 16:9を選ぶ。
    Convertボタンで変換開始。

    iTunesからiPodに同期すれば、完了。

  380. Anonymous said, on August 2, 2010 at 2:21 am

    iphone bluetooth

    http://XXXXs-iphone.local:8080/

  381. Anonymous said, on August 20, 2010 at 8:29 pm

    computer graphics course

    http://www.doc.ic.ac.uk/~dfg/graphics/

  382. Anonymous said, on August 21, 2010 at 1:33 pm

    ubuntu ibus

    http://ubuntuforums.org/showthread.php?t=1473443

  383. Anonymous said, on August 24, 2010 at 10:57 pm

    http://www.procul.org/blog/2010/08/22/makefile-tổng-quat/#comments

    #############################################################################
    # $ make compile and link all C programs specified with PROGS
    # $ make clean clean objects and the executable file
    # $ make distclean clean objects, the executable and dependencies
    # I assume that each .c has a .h of the same name in directory INC_DIR
    # You can compile multiple programs by redefining $(PROGS)
    #===========================================================================

    ## Customizable Section: adapt those variables to suit your program.
    ##==========================================================================
    # The pre-processor and compiler options.
    MY_CFLAGS = -I./include -DBE_DEBUG -D_REENTRANT -Wall -D__EXTENSIONS__

    # Libraries to link to, depending on OS
    UNAME = $(shell uname)
    ifeq ($(UNAME), SunOS) # Sun OS
    MY_LIBS = -lresolv -lsocket -lnsl
    endif
    ifeq ($(UNAME), Linux) # Linux
    MY_LIBS = -lresolv -lnsl
    endif
    ifeq ($(UNAME), Darwin) # Mac OS
    MY_LIBS =
    endif

    # Directory where your .h files are
    INC_DIR := ./include

    # The options used in linking as well as in any direct use of ld.
    LDFLAGS +=

    # The executable file names.
    PROGS = server client iom_client

    ## Implicit Section: change the following only when necessary.
    ##==========================================================================

    CC := gcc
    SRCS := $(wildcard *.c)

    # objects other than those in PROGS
    ALL_OBJS := ${SRCS:.c=.o}
    ALL_NAMES := ${ALL_OBJS:.o=}

    # all object files other than those named $(PROGS).o
    COMMON_OBJS :=
    define APPEND_CO
    ifeq (,$(findstring $(1), $(PROGS)))
    COMMON_OBJS += $(1).o
    endif
    endef
    $(foreach name,$(ALL_NAMES),$(eval $(call APPEND_CO, $(name))))

    .PHONY: all clean distclean

    all: $(PROGS)

    define PROG_RULE
    $(1) : $(COMMON_OBJS) $(1).o
    ${CC} -I${INC_DIR} ${CFLAGS} ${MY_LIBS} ${COMMON_OBJS} $(1).c -o $(1)
    endef

    $(foreach program,$(PROGS),$(eval $(call PROG_RULE, $(program))))

    ## Objects are dependent on headers (and implicitly .c files)
    ##==========================================================================
    define OBJ_RULE
    $(1) : ${INC_DIR}/${1:.o=.h} ${1:.o=.c}
    ${CC} -I${INC_DIR} ${CFLAGS} -c ${1:.o=.c}
    endef

    $(foreach obj_file,$(ALL_OBJS),$(eval $(call OBJ_RULE,$(obj_file))))

    ## clean things up
    ##==========================================================================
    clean:
    @- $(RM) $(PROGS)
    @- $(RM) $(ALL_OBJS)

    distclean: clean

  384. Anonymous said, on August 25, 2010 at 1:15 pm

    get system info
    http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47

  385. Anonymous said, on August 25, 2010 at 1:24 pm

    gcc44-gfortran install

    https://www.centos.org/modules/newbb/viewtopic.php?topic_id=23547

  386. Anonymous said, on August 25, 2010 at 6:24 pm

    CUDA error: the launch timed out and was terminated

    This error means that one of TeraChem kernels (subroutines that are executed on the GPU) took more than ~5-7 seconds to complete and was killed by the so-called system watchdog timer. This timer makes sure that no graphical process runs for more than several seconds to avoid screen freeze. The solution is to shut down the OS GUI (X-server) by typing

    Code:

    init 3

    in the console. You might need to have root privileges to do that

  387. Anonymous said, on August 26, 2010 at 6:51 pm

    HMPP
    http://www.slideshare.net/nabesan/hmpptutorial-ja

  388. Anonymous said, on August 27, 2010 at 1:36 pm

    StartDict
    http://www.scribd.com/doc/5025779/install-stardict-vi1

  389. Anonymous said, on August 27, 2010 at 1:48 pm

    StartDict
    http://wataken.air-nifty.com/blog/dictionary/index.html

  390. Anonymous said, on August 29, 2010 at 11:59 pm

    Open Vietnamese Dictionary Project

    http://sourceforge.net/projects/ovdp/files/Stardict/

  391. Anonymous said, on August 30, 2010 at 12:06 am

    Stardict Japanese dictionaries

    http://reciteword.cosoft.org.cn/stardict-iso/stardict-dic/ja/

  392. Anonymous said, on August 30, 2010 at 12:20 am

    Startdic Thieu Chuu

    http://www.mediafire.com/?mztmuidtkl2

  393. Anonymous said, on September 6, 2010 at 11:34 am

    vim(以下vi)を利用している中で、一画面に複数のファイルの内容を確認
    したいことがありますよね。
    デスクトップ環境であればターミナルを複数起動すれば良いのですが、
    viにはマルチウィンドウ機能があるので、使い方を少し紹介します。

    注意:縦分割はvimのバージョンが古いと使えません。
       今回はvim-enhanced-6.3.046-0.40E.7.2AX.rpm 
       に含まれるVIM version 6.3.82で行いました

    横分割のマルチウィンドウにする
    【Ctrl-W】+ 【S】
    :split
    :sp

    別ウィンドウを新規編集にする
    【Ctrl-W】 + 【N】
    :split n
    :sp n

    縦分割のマルチウィンドウにする
    【Ctrl-W】 +【V】
    :vsplit
    :vsp

    別ウィンドウを新規編集にする
    :vsplit n
    :vsp n

    ウィンドウを閉じる
    【Ctrl-W】 + 【Q】
    :q

    カレントウィンドウ以外を閉じる
    【Ctrl-W】 + 【O】

    次のウィンドウへ移動する
    【Ctrl-W】 + 【W】

    前のウィンドウへ移動する
    【Ctrl-W】 + 【P】

    カレントウィンドウのサイズを大きくする
    【Ctrl-W】 + 【+】
    ※【+】を入力する前に数字を入力すると、指定分サイズを大きくする

    カレントウィンドウのサイズを小さくする
    【Ctrl-W】 + 【-】
    ※【-】を入力する前に数字を入力すると、指定分サイズを小さくする

    これだけ使えれば大抵の操作は可能です。
    一つのvi上であれば複数のファイルに対して文字列の検索/置換をかけたり、
    コピー&ペーストを行えるので使い方によってはとても便利です。

    詳しい情報は
    :help

    |usr_08.txt| Splitting windows
    に記載されています
    (help表示時にもウィンドウが分割されています)

  394. Anonymous said, on September 6, 2010 at 11:45 am

    Commands to take advantage of bash’s Emacs Mode:
    ctrl-a Move cursor to beginning of line
    ctrl-e Move cursor to end of line
    meta-b Move cursor back one word
    meta-f Move cursor forward one word
    ctrl-w Cut the last word
    ctrl-u Cut everything before the cursor
    ctrl-k Cut everything after the cursor
    ctrl-y Paste the last thing to be cut
    ctrl-_ Undo

    NOTE: ctrl- = hold control, meta- = hold meta (where meta is usually the alt or escape key).

    A combination of ctrl-u to cut the line combined with ctrl-y can be very helpful. If you are in middle of typing a command and need to return to the prompt to retrieve more information you can use ctrl-u to save what you have typed in and after you retrieve the needed information ctrl-y will recover what was cut.
    Set Vi Mode in Bash

    $ set -o vi

    Vi mode allows for the use of vi like commands when at the bash prompt. When set to this mode initially you will be in insert mode (be able to type at the prompt unlike when you enter vi). Hitting the escape key takes you into command mode.

    Commands to take advantage of bash’s Vi Mode:
    h Move cursor left
    l Move cursor right
    A Move cursor to end of line and put in insert mode
    0 (zero) Move cursor to beginning of line (doesn’t put in insert mode)
    i Put into insert mode at current position
    a Put into insert mode after current position
    dd Delete line (saved for pasting)
    D Delete text after current cursor position (saved for pasting)
    p Paste text that was deleted
    j Move up through history commands
    k Move down through history commands
    u Undo

  395. Anonymous said, on September 6, 2010 at 11:58 am

    See if a program, centericq, is running:

    $ ps ax | grep centericq
    25824 pts/2 S 0:18 centericq

    Count the number of files in a directory (nl counts things):

    $ ls | nl
    1 #.emacs#
    2 BitchX
    3 Outcast double cd.lst
    4 bm.shader
    5 bmtexturesbase.pk3

    If my memory serves using RPM to check if a package is installed:

    $ rpm -qa | grep package_name

    A more advance example:

    $ cat /etc/passwd | awk -F: ‘{print $1 “\t” $6}’ | sort > ./users

    This sequence takes the information if the file passwd, pipes it to awk, which takes the first and sixth fields (the user name and home directory respectively), pipes these fields separated by a tab (“\t”) to sort, which sorts the list alphabetically, and puts it into a file called users.

  396. Anonymous said, on September 6, 2010 at 12:02 pm

    http://www.hypexr.org/bash_tutorial.php#emacs

    alias ls=’ls -aF –color=always’
    alias ll=’ls -l’
    alias search=grep
    alias mcd=’mount /mnt/cdrom’
    alias ucd=’umount /mnt/cdrom’
    alias mc=’mc -c’
    alias ..=’cd ..’ alias …=’cd ../..’

  397. Anonymous said, on September 7, 2010 at 7:09 pm

    vtk reader point data

    http://www5.atwiki.jp/ciez/pages/25.html

  398. Anonymous said, on September 9, 2010 at 11:28 am

    /long/path/is/long$ pushd /usr
    /usr$ popd
    /long/path/is/long$

  399. Anonymous said, on September 10, 2010 at 11:58 pm

    template
    T max(T a, T b) {
    return a > b ? a : b;
    }

    int main() {
    std::cout << ::max(9, 5) << std::endl; // 9

    std::string foo("foo"), bar("bar");
    std::cout << ::max(foo, bar) << std::endl; // "foo"
    }

  400. Anonymous said, on September 12, 2010 at 6:31 pm

    http://wazem.dyndns.org/index.php?option=com_content&view=category&layout=blog&id=62&Itemid=91

    1- Mayday, server is down

    There are two ways we can do this, and it will depend on how often do you need to check if the server is down. If you need it to be done every minute or so, I’d advise using a service instead of crontab. I could not personally say what’s the system hog difference, but I’m open for feedbacks. In my case I’ll be checking every hour, so I’ll use crontab.

    Other thing required is a cli email client, and there are many you can use. I choose msmtp, which is extremely easy to configure. Here’s what I have set to use my gmail account:

    defaults
    tls on
    tls_certcheck off
    logfile ~/.msmtp.log
    account gmail
    host smtp.gmail.com
    port 587
    from me@gmail.comThis e-mail address is being protected from spambots. You need JavaScript enabled to view it
    auth on
    user me@gmail.comThis e-mail address is being protected from spambots. You need JavaScript enabled to view it
    password ######
    account default : gmail

    To send an email is as easy as:

    $ echo -e “Subject: Test \n\n This is the message body” | msmtp -v email@address1 email@address2

    So now that we have means to send the message, let’s create the script. Remember that the script will need to be run from another PC and not from the server. A server that is down cannot send emails!!

    #!/bin/bash

    ## pings the server IP. Here I’m using only one ping as some distros ping 4x times (Fedora), and others will ping consecutively by default (Ubuntu)
    ping -c 1 server

    ## checks if the ping was successful or not, if not it sends an email and a sms with the last time it tried to ping
    if [ “$?” != “0” ] ; then
    echo -e “Subject: Server is down \n\n Victor, \n Server is down. Last time tested was $(date).” | msmtp -v me@adreess.caThis e-mail address is being protected from spambots. You need JavaScript enabled to view it 12312345678@cellprovider.comThis e-mail address is being protected from spambots. You need JavaScript enabled to view it
    fi

    Now we add the script to your crontab and send any error msg to a txt. Make sure that your account has pinging privileges

    $ crontab -e
    # Check if server is up every hour
    0 * * * * /home/user/bin/script.sh 2>> /home/user/var/log/server-up-log.txt

    2- Checking /var/logs size

    The process here will be almost the same, however both script and crontab need to be run on the server. Our script should look something like:

    #!/bin/bash

    ## Some txt editing. We will check /var/log size by using “df” and then striping it down to numbers only
    e=`df -h | grep ‘var\/log’ | awk ‘{ print $5 ;}’ | sed ‘s/%//’`

    ## If the size of /var/log gets higher than 75% we will get an email and a sms
    if [ "$e" -gt "75" ] ; then
    echo -e “Subject: Log folder \n\n Victor, \n Log folder has reached 75%” | msmtp -v me@adreess.caThis e-mail address is being protected from spambots. You need JavaScript enabled to view it 12312345678@cellprovider.comThis e-mail address is being protected from spambots. You need JavaScript enabled to view it
    fi

    Add the script to your crontab on the server and you are done.

    Have fun!!!

  401. Anonymous said, on September 12, 2010 at 6:32 pm

    How to get email and sms notifications from your server

  402. Anonymous said, on September 12, 2010 at 11:18 pm

    http://love-python.blogspot.com/2008/08/how-to-send-email-from-python-script.html
    import smtplib

    SERVER = “localhost”

    FROM = “sender@example.com”
    TO = ["user@example.com"] # must be a list

    SUBJECT = “Hello!”

    TEXT = “This message was sent with Python’s smtplib.”

    # Prepare actual message

    message = “””\
    From: %s
    To: %s
    Subject: %s

    %s
    “”” % (FROM, “, “.join(TO), SUBJECT, TEXT)

    # Send the mail

    server = smtplib.SMTP(SERVER)
    server.sendmail(FROM, TO, message)
    server.quit()

  403. send mail via gmail with python said, on September 13, 2010 at 1:23 am
    
    #!/usr/bin/python
    
    import smtplib
    from email.MIMEMultipart import MIMEMultipart
    from email.MIMEBase import MIMEBase
    from email.MIMEText import MIMEText
    from email import Encoders
    import os
    
    gmail_user = "your_email@gmail.com"
    gmail_pwd = "your_password"
    
    def mail(to, subject, text, attach):
       msg = MIMEMultipart()
    
       msg['From'] = gmail_user
       msg['To'] = to
       msg['Subject'] = subject
    
       msg.attach(MIMEText(text))
    
       part = MIMEBase('application', 'octet-stream')
       part.set_payload(open(attach, 'rb').read())
       Encoders.encode_base64(part)
       part.add_header('Content-Disposition',
               'attachment; filename="%s"' % os.path.basename(attach))
       msg.attach(part)
    
       mailServer = smtplib.SMTP("smtp.gmail.com", 587)
       mailServer.ehlo()
       mailServer.starttls()
       mailServer.ehlo()
       mailServer.login(gmail_user, gmail_pwd)
       mailServer.sendmail(gmail_user, to, msg.as_string())
       # Should be mailServer.quit(), but that crashes...
       mailServer.close()
    
    mail("some.person@some.address.com",
       "Hello from python!",
       "This is a email sent with python",
       "my_picture.jpg")
    
    
  404. Anonymous said, on September 13, 2010 at 1:26 am

    script that sends an email with an attachment

    http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html

  405. Anonymous said, on September 14, 2010 at 12:29 am

    http://labs.unoh.net/2007/06/python_2.html

    # -*- coding: utf-8 -*-
    import smtplib
    from email.MIMEText import MIMEText
    from email.Utils import formatdate

    def create_message(from_addr, to_addr, subject, body):
    msg = MIMEText(body)
    msg['Subject'] = subject
    msg['From'] = from_addr
    msg['To'] = to_addr
    msg['Date'] = formatdate()
    return msg

    def send(from_addr, to_addr, msg):
    # SMTPの引数を省略した場合はlocalhost:25
    s = smtplib.SMTP()
    s.sendmail(from_addr, [to_addr], msg.as_string())
    s.close()

    if __name__ == ‘__main__’:
    from_addr = ‘spam@example.com’
    to_addr = ‘egg@example.com’
    msg = create_message(from_addr, to_addr, ‘test subject’, ‘test body’)
    send(from_addr, to_addr, msg)

    Gmail

    # -*- coding: utf-8 -*-
    import smtplib
    from email.MIMEText import MIMEText

    def create_message(from_addr, to_addr, subject, body):
    # 上と同じ
    pass

    def send_via_gmail(from_addr, to_addr, msg):
    s = smtplib.SMTP(‘smtp.gmail.com’, 587)
    s.ehlo()
    s.starttls()
    s.ehlo()
    s.login(‘yourname@gmail.com’, ‘password’)
    s.sendmail(from_addr, [to_addr], msg.as_string())
    s.close()

    if __name__ == ‘__main__’:
    from_addr = ‘yourname@gmail.com’
    to_addr = ‘egg@example.com’
    msg = create_message(from_addr, to_addr, ‘test subject’, ‘test body’)
    send_via_gmail(from_addr, to_addr, msg)

    日本語を含んだメール

    emailパッケージのデフォルトの文字セットは’us-ascii’なので、日本語を含んだメールを送信する場合は、明示的に指定する必要があります。

    plain/textのMIME文書の場合は、MIMETextオブジェクトのコンストラクタで文字セットを指定するのが一番簡単です。それに加えて、メールのヘッダーは、email.HeaderのHeaderオブジェクトを使って国際化しなくてはなりません。

    # -*- coding: utf-8 -*-
    import smtplib
    from email.MIMEText import MIMEText
    from email.Header import Header
    from email.Utils import formatdate

    def send(from_addr, to_addr, msg):
    # 上に同じ
    pass

    def create_message2(from_addr, to_addr, subject, body, encoding):
    # ‘text/plain; charset=”encoding”‘というMIME文書を作ります
    msg = MIMEText(body, ‘plain’, encoding)
    msg['Subject'] = Header(subject, encoding)
    msg['From'] = from_addr
    msg['To'] = to_addr
    msg['Date'] = formatdate()
    return msg

    if __name__ == ‘__main__’:
    from_addr = ‘spam@example.com’
    to_addr = ‘egg@example.com’
    msg = create_message2(from_addr, to_addr, u’テスト’, u’本文’, ‘ISO-2022-JP’)
    send(from_addr, to_addr, msg)

  406. Anonymous said, on September 14, 2010 at 11:20 am

    How to Use UTF-8 with Python
    http://evanjones.ca/python-utf8.html

  407. Anonymous said, on September 14, 2010 at 11:33 am

    Handling International Text with Unicode (Python)
    http://code.activestate.com/recipes/361742-handling-international-text-with-unicode/

  408. Anonymous said, on September 14, 2010 at 10:51 pm

    $ curl -u you@gmail.com –silent “https://mail.google.com/mail/feed/atom” |
    perl -ne \

    print “Subject: $1 ” if /(.+?)/ && $title++;
    print “(from $1)\n” if /(.+?)/;

  409. Anonymous said, on September 14, 2010 at 10:59 pm

    curl -u you@gmail.com –silent “https://mail.google.com/mail/feed/atom” |
    perl -ne \

    print “Subject: $1 ” if /(.+?)/ && $title++;
    print “(from $1)\n” if /(.+?)/;

  410. Anonymous said, on September 15, 2010 at 4:29 pm

    http://www.bu.edu/tech/research/training/scv-software-packages/vtk/

    C++: Writing a VTK application using C++ is the most flexible approach but also the most involved. Using C++ as your development language will typically result in smaller and faster applications than Tcl or Python scipts. To get you started here is an example C++ Makefile:

    CPP = g++
    VTKLIBDIR = /usr/local/vtk/lib
    VTKINCDIR = /usr/local/vtk/include
    .SUFFIXES : .cxx
    LOCAL =

    INCLUDE = -I${VTKINCDIR} -I/usr/X11R6/include
    OPTIM = -O2 -g -Wno-deprecated
    CFLAGS = ${INCLUDE}
    LIBS = -L${VTKLIBDIR} -L/usr/X11R6/lib

    GLIBS = -lXm -lGL -lm -lvtkImaging -lvtkGraphics -lvtkCommon -lvtkRendering

    .cxx:
    $(CPP) $(CFLAGS) ${OPTIM} $< ${LIBS} ${GLIBS} -o $@

    To compile your c++ application using this Makefile you would do the following:

    cootie:% make Mywork.cxx

    Depending on which VTK libraries you use in your application, you will have to either add or subtract VTK libraries on the GLIBS line of the Makefile. The ones listed are typical libraries used in many VTK applications. The libraries which you list may include calls to other VTK libraries, etc. A shortcut to include these ’secondary’ libraries is to set LD_LIBRARY_PATH (as described below) before compiling.

    Your VTK program will look for shared libraries at run-time, so before running it, you will need to set the LD_LIBRARY_PATH environment variable:

    cootie% setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:/usr/local/vtk/lib

  411. Anonymous said, on September 16, 2010 at 3:04 pm

    vtk plot
    http://www.itk.org/Wiki/VTK/Examples/Cxx/Plotting/StackedPlot

  412. Anonymous said, on September 19, 2010 at 1:52 am

    25 ubuntu linux app;ications

    http://www.knowliz.com/2009/08/25-must-have-ubuntu-linux-applications.html

  413. Anonymous said, on September 19, 2010 at 4:32 pm

    Mount ISO

    sudo mkdir -p /mnt/iso

    sudo mount -t iso9660 -o loop ×××.iso /mnt/iso

    アンマウントの場合は

    sudo umount /mnt/iso

  414. Anonymous said, on September 20, 2010 at 7:46 am

    To find data that exists in the file1 not exists in file2
    diff file1 file2| grep ‘<' | tr -d '’ | tr -d ‘> ‘

  415. Anonymous said, on September 20, 2010 at 7:55 am

    To find data that exists in the file2 not exists in file1
    diff file1 file2| grep ‘>’ | tr -d ‘> ‘

  416. Anonymous said, on September 23, 2010 at 7:44 am

    Bjarne Stroustrup’s C++ Style and Technique FAQ

    http://www2.research.att.com/~bs/bs_faq2.html#malloc

  417. Anonymous said, on September 23, 2010 at 4:54 pm

    google reader
    http://www.niallkennedy.com/blog/2005/12/google-reader-api.html

  418. Anonymous said, on September 23, 2010 at 6:32 pm

    Pythonで遊ぶよ

    http://python.g.hatena.ne.jp/edvakf/

  419. Anonymous said, on September 25, 2010 at 4:49 pm

    nPWH5cvAaC

  420. Anonymous said, on October 10, 2010 at 2:47 am

    Hello, my name is Jon Squire and I have been using computers
    to solve numerical problems since 1959. I have about 1 million
    lines of source code, written over the past 50 years.
    How can that be? Check the numerical computation:
    1,000,000/50 years is 20,000 lines per year.
    20,000/200 working days per year is 100 lines per working day.
    With a lot of reuse, cut-and-paste, same programs and
    data files including scripts for many languages on many
    operating systems, easy.

    On a job, 20,000/(50 weeks*5 days per week) is 80 lines per day.
    80/8 hours is 10 lines per hour. You can do that.
    You may not save every line you type. sad.

  421. Anonymous said, on October 10, 2010 at 8:54 am

    Floating Point Unit by Jidan Al-Eryani
    IEEE 754 references
    Let’s Get To The (Floating) Point by Chris Hecker
    What Every Computer Scientist Should Know About Floating-Point Arithmetic by David Goldberg
    The pitfalls of verifying floating-point computations
    IEEE 854-1987 履歴と覚書
    Web Based Converter
    Another Web Based Converter
    Java Applet Converter
    Converter as MS-Windows program
    An Interview with the Old Man of Floating-Point
    Coprocessor.info : x87 FPU pictures, development and manufacturer information

  422. Anonymous said, on October 10, 2010 at 2:30 pm

    how to convert 4 bytes into a float

  423. Anonymous said, on October 10, 2010 at 2:40 pm

    http://www.atmos.washington.edu/
    salathe/osx_unix/endian.html

  424. Anonymous said, on October 10, 2010 at 2:46 pm

    FORTRAN BINARY FILE COMPATIBILITY W/ MATLAB : Fortran

  425. Anonymous said, on October 10, 2010 at 2:51 pm

    export FORT_CONVERT60=BIG_ENDIAN

  426. Anonymous said, on October 10, 2010 at 2:59 pm

    Reading FORTRAN unformatted binary files in C/C++

  427. Anonymous said, on October 10, 2010 at 3:03 pm

    gfortran’s flag -fconvert=big-endian

  428. Anonymous said, on October 10, 2010 at 3:12 pm

    Binary I/O Between Big-Endian and Little-Endian Platforms

  429. Anonymous said, on October 10, 2010 at 3:14 pm

    A new compiler flag -xfilebyteorder provides support for binary I/O files when moving between SPARC and x86 platforms. The flag identifies the byte-order and byte-alignment of unformatted I/O files.

    For example,

    -xfilebyteorder=little4:%all,big16:20

    would specify that all files (except those opened as “SCRATCH”) contain “little-endian” data aligned on 4-byte boundaries (for example 32-bit x86), except for Fortran unit 20, which is a 64-bit “big-endian” file (for example 64-bit SPARC V9).

    For details, see the f95(1) man page or the Fortran User’s Guide.

  430. Anonymous said, on October 13, 2010 at 8:32 am

    Understanding Big and Little Endian Byte Order
    http://betterexplained.com/articles/understanding-big-and-little-endian-byte-order/

  431. Anonymous said, on October 13, 2010 at 5:45 pm

    artofproblemsolving
    Latex Symnbols

  432. Anonymous said, on October 13, 2010 at 7:10 pm

    Latex symbols
    http://www.imsc.res.in/Computer/symbols-letter.pdf

  433. Anonymous said, on October 14, 2010 at 4:31 pm

    Merging cells in a column of a table

    It’s easy to come up with a table design that requires a cell that spans several rows. An example is something where the left-most column labels the rest of the table; this can be done (in simple cases) by using diagonal separation in corner cells, but that technique rather strictly limits what can be used as the content of the cell.

    The multirow package enables you to construct such multi-row cells, in a very simple manner. For the simplest possible use, one might write:

    \begin{tabular}{|c|c|}
    \hline
    \multirow{4}{*}{Common g text}
    & Column g2a\\
    & Column g2b \\
    & Column g2c \\
    & Column g2d \\
    \hline
    \end{tabular}

    and multirow will position “Common g text” at the vertical centre of the space defined by the other rows. Note that the rows that don’t contain the “multi-row” specification must have empty cells where the multi-row is going to appear.

    The “*” may be replaced by a column width specification. In this case, the argument may contain forced line-breaks:

    \begin{tabular}{|c|c|}
    \hline
    \multirow{4}{25mm}{Common\\g text}
    & Column g2a\\
    & Column g2b \\
    & Column g2c \\
    & Column g2d \\
    \hline
    \end{tabular}

    A similar effect (with the possibility of a little more sophistication) may be achieved by putting a smaller table that lines up the text into a *-declared \multirow.

    The \multirow command may also used to write labels vertically down one or other side of a table (with the help of the graphics or graphicx package, which provide the \rotatebox command):

    \begin{tabular}{|l|l|}
    \hline
    \multirow{4}{*}{\rotatebox{90}{hi there}}
    & Column g2a\\
    & Column g2b \\
    & Column g2c \\
    & Column g2d \\
    \hline
    \end{tabular}

    (which gives text going upwards; use angle -90 for text going downwards, of course).

    To make a \multicolumn multi-row “cell” in a table, you have to enclose a \multirow inside a \multicolumn — the other way around does not work, so:

    \begin{tabular}{|c|c|c|}\hline
    \multicolumn{2}{|c|}{\multirow{2}{*}{combined cells}}
    &top right\\ \cline{3-3}
    \multicolumn{2}{|c|}{}
    &middle right\\ \hline
    bottom left
    &bottom center
    &bottom right\\ \hline
    \end{tabular}

    Multirow is set up to interact with the bigstrut package (which is also discussed in the answer to spacing lines in tables). You use an optional argument to the \multirow command to say how many of the rows in the multi-row have been opened up with \bigstrut.

    The documentation of both multirow and bigstrut is to be found, as comments, in the package files themselves.

    bigstrut.sty
    macros/latex/contrib/multirow (or browse the directory); catalogue entry
    multirow.sty
    macros/latex/contrib/multirow (or browse the directory); catalogue entry

  434. Anonymous said, on October 14, 2010 at 5:57 pm

    LaTeX symbol classifier
    http://detexify.kirelabs.org/classify.html

  435. Anonymous said, on October 21, 2010 at 3:59 pm

    Centering wide tables or figures

  436. Anonymous said, on October 22, 2010 at 2:48 pm

    GeForce GTX 460 と GTX 260 の CUDA 性能比較
    GF106/108ベースのカードが登場です

    ・NVIDIA Launches Quadro 2000 & Quadro 600  by AnandTech

    ※関連記事
    ・GeForce GT 430のスペック(10/4)

    GeForce GTS 450と同じGF106ベースのQuadro 2000と、GeForce GT 430と同じGF108ベースのQuadro 600がリリースとなりました
    それぞれスペックは以下の通り

    ・Quadro 2000(GF106)・・・192sp/16ROPs/128bit/GDDR5/62W
    ・Quadro 600(GF108)・・・96sp/8ROPs/128bit/DDR3/40W

    上位モデルと同様にGeForce系の同コア搭載製品と比べ、TDPが抑えられているのが目立ちます
    Quadro 600なんかはローエンドカードの消費電力そのもので、カード自体も単純なロープロカードとなっています

    GF100搭載のQuadro上位モデルとの大きな違いは、ECCが非サポートとなっており、さらにアーキテクチャの違いからFP64での性能がFP32の1/12となります
    Quadro 6000/5000ではもちろんECCサポートで、FP64での性能はFP32の1/2となります
    Teslaでもないですから、FP64を使う機会はあまりないかと思いますのでこの点は良さそうですが
    http://www.hardwareboard.eu/threads/10858-Nvidia-GF100-Fermi-Thread-*Updated*
    geforce dp floating point
    http://techreport.com/articles.x/18682
    Actually, you have core and shader clock backwards. The core clock runs some functions on the multiprocessor level, like the instruction decoder, and the shader clock runs the individual processors. The shader clock is the fastest of the two, and this sets the speed of arithmetic operations by the processor.

    As far as estimating the speed of a GPU, the core clock is not important.

  437. Anonymous said, on October 28, 2010 at 3:51 pm

    > I have done a “yum install qt-devel” on centos 5.
    >
    > I dont seem to be able to find qmake?
    >
    > how do I get qmake on centos 5?
    >
    > THanks,
    >

    rpm -ql qt-devel | grep qmake

    will show you
    /usr/lib/qt-3.3/bin/qmake

    /etc/profille.d/qt.sh (or qt.csh)

    should put it in your search path

    Tony Schreiner

  438. Anonymous said, on October 28, 2010 at 4:41 pm

    The Qt4 packages for Centos are updated to 4.6.2 and Qt Creator is updated to 1.3.1.

    To install:

    rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm

    yum update fontconfig fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator

    Verify that the versions are coming from software.freivald.com and enjoy.

  439. Anonymous said, on October 29, 2010 at 8:58 am

    Daemon tools
    http://www.daemon-tools.cc/eng/products/dtLite

  440. Anonymous said, on November 4, 2010 at 4:00 pm

    GDB fortran

    http://people.sc.fsu.edu/~jburkardt/f_src/gdb/gdb.html

  441. Anonymous said, on November 6, 2010 at 12:53 am

    How to Reset Ubuntu/Gnome Settings to Defaults without Re-installing

    rm -rf .gnome .gnome2 .gconf .gconfd .metacity

  442. Anonymous said, on November 6, 2010 at 1:16 am

    gdb
    conditional breakpoints
    break file1.c:6 if i >= ARRAYSIZE

    Typing “step” or “next” a lot of times can be tedious. If you just
    press ENTER, gdb will repeat the same command you just gave it.
    You can do this a bunch of times.

  443. Anonymous said, on November 9, 2010 at 7:33 pm

    To properly install a perl module try the CPAN shell first

    delia root # perl -MCPAN -e shell

    cpan shell — CPAN exploration and modules installation (v1.7601)
    ReadLine support enabled

    cpan> install XML::Parser
    CPAN: Storable loaded ok
    CPAN: LWP::UserAgent loaded ok
    Fetching with LWP:
    ftp://archive.progeny.com/CPAN/authors/01mailrc.txt.gz

  444. Anonymous said, on November 11, 2010 at 5:56 pm

    Kmenu shortcut key assignment

    Paste these commands into the terminal:
    Code:

    sudo updatedb
    grep -inr “Key=Win+A” ~/.kde

  445. Anonymous said, on November 11, 2010 at 8:20 pm

    Brother printer

    http://solutions.brother.co.jp/support/os/linux/cups_printer/install_01.html

  446. Anonymous said, on November 15, 2010 at 5:18 pm

    screen copy

    http://michael.thegrebs.com/2008/07/10/screen-copy-mode-can-copy/

  447. Anonymous said, on November 20, 2010 at 2:02 am

    yum install AcetoneISO

    yum install yum-utils
    package-cleanup –leaves
    yum remove libtool-1.5.24-6.fc9

  448. Anonymous said, on November 21, 2010 at 2:05 am

    linx tips

    http://www.atmarkit.co.jp/flinux/rensai/linuxtips/611usefllyum.html

  449. Anonymous said, on November 26, 2010 at 5:40 pm

    Keyboard shortcut
    http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts

  450. Anonymous said, on November 28, 2010 at 3:34 pm

    Installing GLUI using VC++ on windows

    http://masdel.wordpress.com/2010/06/13/installing-glui-using-vc-on-windows/

  451. Anonymous said, on November 28, 2010 at 9:02 pm

    msvcprtd.lib(MSVCP100D.dll) : error LNK2005: already defined in gtestd.lib(gtest.obj)
    This error occurs when the C/C++ Code Generation Runtime Library in gtest is defined differently from testing code using it. The gtest project was defined as MTd (Multi-threaded Debug) and the testing project defined as MDd (Multi-threaded DLL).

    Fix: Changed the testing project to use MTd. From the Property Pages select Configuration Properties ==> C/C++ ==> Code Generation ==> Runtime Library ==> Multi-threaded (/MT).

  452. Anonymous said, on November 29, 2010 at 3:01 pm

    自分がログインするサーバすべての ~/.bashrc や ~/.zshrc に以下のように書いておくとよい

    screen -d -R

    ※. デタッチ、アタッチオプションについてはお好みで
    デタッチとアタッチのオプション
    オプション 説明
    -d セッションをデタッチする
    -r セッションをアタッチする
    -d -r セッションを再アタッチする。必要ならばまずデタッチする
    -d -R セッションを再アタッチする。必要ならばまずデタッチするか、あるいはセッションを生成する
    -d -RR セッションを再アタッチする。必要ならばまずデタッチするか、あるいはセッションを生成する。複数のセッションをアタッチ可能な場合は、最初のセッションを使う
    -D -r セッションを再アタッチする。必要ならばリモートのデタッチとログアウトを先に行う
    -D -R アタッチを今ここで行う。具体的には、セッションが走っている場合には再アタッチを行い、必要ならばまずリモートのデタッチとログアウトを行う。動作中のセッションがなければ生成してユーザに知らせる
    -D -RR アタッチを今ここで行う。参考: ときどき “screen -list” を使って、自分のセッションの状態をチェックすると良い

  453. Anonymous said, on December 2, 2010 at 9:41 am

    LBM
    site: http://www.crss.ucsb.edu Lattice

  454. Anonymous said, on December 5, 2010 at 11:39 pm

    Mathematicians Solve 140-Year-Old Boltzmann Equation

    http://www.upenn.edu/pennnews/news/university-pennsylvania-mathematicians-solve-140-year-old-boltzmann-equation-gaseous-behaviors

  455. Anonymous said, on December 6, 2010 at 12:44 am

    An Introduction to the Lattice Boltzmann Method
    By Ramanathan Vishnampet | Published: November 28, 2009

  456. Anonymous said, on December 6, 2010 at 4:10 pm

    NVIDIA Parallel Nsight について

    http://imd.naist.jp/~fujis/cgi-bin/wiki/index.php?NVIDIA%20Parallel%20Nsight%20%A4%CB%A4%C4%A4%A4%A4%C6

  457. Anonymous said, on December 6, 2010 at 4:44 pm

    Debugging with gdb

    o r = run the program (can give arguments, e.g., r -f foo.txt or r next, $tmp->data)

    To establish multiple active “variable displays” without re-typing each of display i, display s[i], etc. every time you restart GDB, use a GDB “canned command sequence”.

    For example, add this to your ~/.gdbinit:

    define disp_vars
    disp i
    disp sign
    disp val
    disp exp
    disp s[i]
    end

    Now you can add all the displays at once by typing disp_vars at the GDB prompt.

    gdb ./test
    (gdb) break main
    (gdb) run

    watch
    backtrack
    http://rat.cis.k.hosei.ac.jp/article/devel/print-debugongccgdb2.html

    whatisコマンドや、ptypeコマンドを使用することによって、その変数の型を調べることができます。

    この状態でlistコマンドを実行すると、以下のように現在の前後の行が表示されます。

    delete [breakpoints] [bnums...]
    Delete the breakpoints, watchpoints, or catchpoints of the numbers specified as arguments. If no argument is specified, delete all breakpoints(GDB asks confirmation, unless you have set confirm off). You can abbreviate this command as d.

  458. Anonymous said, on December 6, 2010 at 4:45 pm

    o r = run the program (can give arguments, e.g., r -f foo.txt or r < test.script)
    o file filename = load in the executable filename
    o s = step through code (enters function being called)
    o n = next line (treats function being called as single operation)
    o where = get a stack trace
    o u (d) = move up (down) the stack trace
    o cont = continue execution till break/end of program
    o fin = finish function, i.e., run to return
    o b functioname = set breakpoint for function called functioname
    o b filename:lineno = set breakpoint at line lineno in file filename
    o info b = print information on breakpoints
    o disable 7 = disable breakpoint number 7
    o cond 7 ( a == b ) = break at breakpoint 7 iff ( a == b ) is true
    o watch x = break whenver x is written (rwatch, awatch for read/both)
    o p varName = print variable varName
    o p $ = print the current value of last variable printed
    o disp x = print the value of x after each command
    o RETURN KEY = repeat the last command
    o TAB = completion, works for var/func names as well as files

  459. Anonymous said, on December 6, 2010 at 4:45 pm

    GDB: smart ways to print arrays and lists

    (gdb) set $index=0
    (gdb) print array[$index++]

    as you keep hitting return, you get the values in sequence;
    it’s very similar with lists:

    (gdb) set $ptr=Ntk_LongNameForAPtrToListHead
    (gdb) p ($tmp = $ptr, $ptr=$ptr->next, $tmp->data)

    To establish multiple active “variable displays” without re-typing each of display i, display s[i], etc. every time you restart GDB, use a GDB “canned command sequence”.

    For example, add this to your ~/.gdbinit:

    define disp_vars
    disp i
    disp sign
    disp val
    disp exp
    disp s[i]
    end

    Now you can add all the displays at once by typing disp_vars at the GDB prompt.

    gdb ./test
    (gdb) break main
    (gdb) run

    watch
    backtrack
    http://rat.cis.k.hosei.ac.jp/article/devel/print-debugongccgdb2.html

    whatisコマンドや、ptypeコマンドを使用することによって、その変数の型を調べることができます。

    この状態でlistコマンドを実行すると、以下のように現在の前後の行が表示されます。

    delete [breakpoints] [bnums...]
    Delete the breakpoints, watchpoints, or catchpoints of the numbers specified as arguments. If no argument is specified, delete all breakpoints(GDB asks confirmation, unless you have set confirm off). You can abbreviate this command as d.

  460. Anonymous said, on December 9, 2010 at 1:45 am

    Let’s assume that you have a C code sample.c that contains some MPI commands. Compile and link the MPI code by

    mpicc -o sample sample.c

    The script mpicc (located in directory $MPIHOME/bin) works on the surface just like the regular compiler gcc. For instance, the option -o sample chooses the name of the output file (here the executable file), and mpicc compiles and links in one (apparent) step.

    If your code includes mathematical functions (like exp, cos, etc.), you need to link to the mathematics library libm.so. This is done, just like for serial compiling, by adding -lm to the end of your compile command, that is,

    mpicc -o sample sample.c -lm

    In a similar fashion, other libraries can be linked.

    More formally, I could also separate the compile from the link step. That is, the C file sample.c is first compiled into object code sample.o, which then gets linked to the required libraries to obtain the executable sample. The sequence of the two commands

    mpicc -c sample.c
    mpicc -o sample sample.o -lm

    accomplishes this, where the option -c stands for “compile-only”.

    See the man page of mpicc for more information by saying

    man mpicc

  461. Anonymous said, on December 9, 2010 at 1:51 am

    The gstat command can be used to get a list of currently active nodes and generate a load balanced machines file. A machines file can be generated in the current directory with the command
    gstat -m > machines

  462. Anonymous said, on December 9, 2010 at 2:08 am

    Specifying Hosts

    Hosts can be specified in a number of ways. The most common of which is in a

    shell$ cat my-hostfile node00 slots=2 node01 slots=2 node02 slots=2
    mpirun –hostfile my-hostfile -np 3 a.out
    This will run one copy of the executable a.out on hosts node00,node01, and node02.
    Another method for specifying hosts is directly on the command line. Here can can include and exclude hosts from the set of hosts to run on. For example:
    mpirun -np 3 –host a a.out
    Runs three copies of the executable a.out on host a.
    mpirun -np 3 –host a,b,c a.out
    Runs one copy of the executable a.out on hosts a, b, and c.
    mpirun -np 3 –hostfile my-hostfile –host node00 a.out
    Runs three copies of the executable a.out on host node00.
    mpirun -np 3 –hostfile my-hostfile –host node10 a.out
    This will prompt an error since node10 is not in my-hostfile; mpirun will abort.
    shell$ mpirun -np 1 –host a hostname : -np 2 –host b,c uptime
    Runs one copy of the executable hostname on host a. And runs one copy of the executable uptime on hosts b and c.

  463. Anonymous said, on December 9, 2010 at 11:55 pm

    LBM book
    http://www.ebookf.com/la/lattice-boltzmann-methode-book.pdf

  464. Anonymous said, on December 16, 2010 at 11:43 pm

    LaTeXe’s Colour Extensions

    http://www.math.harvard.edu/computing/latex/color.html

  465. Anonymous said, on December 17, 2010 at 12:06 am

    Alternate Row Shading in LaTeX Table
    http://suusiki.wordpress.com/2009/01/24/test2/#comment-613

  466. Anonymous said, on December 17, 2010 at 12:29 am

    Highlighting table cells

    http://tex.stackexchange.com/questions/4850/highlighting-table-cells

  467. Anonymous said, on December 17, 2010 at 1:18 am

    Never, ever use vertical rules
    Never use double rules

    http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf

  468. Anonymous said, on December 17, 2010 at 1:21 am

    How to wrap text in LaTeX tables?
    Use p{width} for your column specifiers instead of l/r/c.

    Use p{width} for your column specifiers instead of l/r/c.

    \begin{tabular}{|p{1cm}|p{3cm}|}
    This text will be wrapped & Some more text \\
    \end{tabular}

    Another solution is the tabularx environment:

    \usepackage{tabularx}

    \begin{tabularx}{\linewidth}{ r X }
    right-aligned foo & long long line of blah blah that will wrap when the table fills the column width\\
    \end{tabularx}

    All X columns get the same width. You can influence this by setting \hsize in the format declaration:

    >{\setlength\hsize{.5\hsize}} X >{\setlength\hsize{1.5\hsize}} X

    but then all the factors have to sum up to 1, I suppose (I took this from the LaTeX companion). There is also the package tabulary which will adjust column widths to balance row heights. For the details, you can get the documentation for each package with texdoc tabulary (in TeXlive).

  469. Anonymous said, on December 17, 2010 at 1:33 am

    \begin{tabular}{llr}
    \hline
    \multicolumn{2}{c}{Item} \\
    \cline{1-2}
    Animal & Description & Price (\$) \\
    \hline
    Gnat & per gram & 13.65 \\
    & each & 0.01 \\
    Gnu & stuffed & 92.50 \\
    Emu & stuffed & 33.33 \\
    Armadillo & frozen & 8.99 \\
    \hline
    \end{tabular}

  470. Anonymous said, on December 18, 2010 at 12:59 am

    Indian Tex User Group
    column color

  471. Anonymous said, on December 21, 2010 at 7:42 am

    How to Remember Alphabet Keyboard Arrangement

    Queen Want-to Eat Red Tea Yellow Umbrella I-am OK Papa

    Ant School Door Face Galaxy High-tech Jet Kangaroo Landing

    Zoo Xmas Change Volleyball By Nine Members

  472. Anonymous said, on December 26, 2010 at 9:07 am

    Search Engine for Shared Files

  473. Anonymous said, on December 30, 2010 at 10:28 pm

    download ccleaner

    http://www.filehippo.com/jp/

  474. Anonymous said, on January 25, 2011 at 4:49 pm

    3D scanner
    http://open-light.googlecode.com/svn›
    trunk›
    Calibration›

  475. Anonymous said, on February 4, 2011 at 11:46 am

    Use Your Digital Camera with Linux

    http://missingmanuals.com/pub/a/linux/2005/01/06/digicam.html?page=last&x-order=date

  476. Anonymous said, on February 4, 2011 at 12:29 pm

    openCV camera list

    http://opencv.willowgarage.com/wiki/Welcome/OS

  477. Anonymous said, on February 4, 2011 at 1:11 pm

    Loop Optimizations – Memory Access Patterns
    http://cnx.org/content/m33738/latest/

  478. Anonymous said, on February 8, 2011 at 1:05 pm

    OpenCV install XP
    http://cvwww.ee.ous.ac.jp/oc20inst.html#configure [+]

  479. Anonymous said, on February 9, 2011 at 6:50 pm

    Camera Calibration

    http://dsynflo.blogspot.com/2010_03_01_archive.html

  480. Anonymous said, on February 10, 2011 at 5:45 pm

    calibration camera

    http://www.aishack.in/2010/07/calibrating-undistorting-with-opencv-in-c-oh-yeah/

  481. Anonymous said, on February 12, 2011 at 12:55 am

    Calibration II: Flexible Calibration
    http://rcvlab.ece.queensu.ca/~elec824/notes/CalibrationII.pdf

    Robust One-Shot 3D Scanning Using Loopy Belief Propagation
    http://www.lems.brown.edu/~au/

  482. Anonymous said, on February 12, 2011 at 1:02 am

    Structured light

    http://www.lems.brown.edu/~au/

  483. Anonymous said, on February 12, 2011 at 1:02 am

    # Robust One-Shot 3D Scanning Using Loopy Belief Propagation
    Ali Osman Ulusoy, Fatih Calakli and Gabriel Taubin
    Applications of Computer Vision in Archaeology (ACVA) in conjuction with CVPR 2010.

  484. Anonymous said, on February 12, 2011 at 1:06 am

    Flexible Calibration

    http://rcvlab.ece.queensu.ca/~elec824/notes/CalibrationII.pdf

  485. Anonymous said, on February 12, 2011 at 1:08 am

    Flexible Calibration
    http://rcvlab.ece.queensu.ca/~elec824/notes/CalibrationII.pdf

  486. Anonymous said, on February 12, 2011 at 1:10 am

    Teach Your Old Web Cam New Tricks: Use Video Captures in Your .NET Applications

    http://www.devx.com/dotnet/Article/30375#codeitemarea

  487. Anonymous said, on February 12, 2011 at 1:18 am

    Open CV Microsoft VC

    http://opencv.willowgarage.com/wiki/VisualC%2B%2B

  488. Anonymous said, on February 12, 2011 at 1:21 am

    Scheduling block execution Do multiprocessors block each other

    http://forums.nvidia.com/index.php?showtopic=94734&st=20&p=533631&#entry533631

  489. Anonymous said, on February 12, 2011 at 1:24 am

    Loop Unrolling over Template Arguments

  490. Anonymous said, on February 12, 2011 at 1:31 am

    A Comparative Study of Highlights Detection and Elimination by Color Morphology and Polar Color Models

  491. Anonymous said, on February 12, 2011 at 1:32 am

    A novel vector-based approach to color image retrieval using a vector angular-based distance measure

  492. Anonymous said, on February 12, 2011 at 1:33 am

    Hand-Tuned SGEMM on GT200 GPU

  493. Anonymous said, on February 12, 2011 at 1:41 am

    Nikon Camera Sdk

    The integration of a webcam in a network environment

    http://www.nikonchat.com/nikon-camera-sdk/

  494. Anonymous said, on February 12, 2011 at 4:34 pm

    [OpenCV] video projector calibration

    1. First, calibarte the camera
    2. Image a flat panel with chess board and find its space postion by cvFindExtrinsic…… Function.
    3. Put a white paper to cover the chessboard, but still keep the board on its old position.
    4. Project a chessboard iamge from video-projector into the white paper, find the corners, then you know the 3D position relative the flat panel (the Z should be always zero). Build the corrsonding of 3D points in the flat boards and 2D points in the chessboard image.
    5. Repeat 2-4 several times, use the cvCalibrateCamera to find the intrinsic of the video-projector.

    Frank Wu

  495. Anonymous said, on February 12, 2011 at 4:47 pm

    Make your own 3d scanner!
    http://www.instructables.com/id/Make-your-own-3d-scanner/step8/New-directions/

  496. Anonymous said, on February 12, 2011 at 7:27 pm

    How to: Set Environment Variables for Projects

    1.

    Open the Property Pages dialog box. For details, see How to: Open Project Property Pages.
    2.

    Expand the Configuration Properties node.
    3.

    Click the Debugging node to open the debugging property page.
    4.

    Modify the Environment or Merge Environment project settings.
    5.

    Click OK to accept any modified project settings and close the Property Pages dialog box.

    Syntax

    Syntax is NAME=VALUE. Thus, to prepend “C:\Program Files\CrankCase\DLLS” to the PATH:

    * PATH=C:\Program Files\Crankcase\DLLS;%PATH%

    Macros such as $(OutDir) and $(TargetDir) may also be used–see “Macros for Build Commands and Properties” for others.

    Naturally, syntax errors fail silently–intended environment modifications after the syntax error have no effect.

  497. Anonymous said, on February 13, 2011 at 12:37 am

    OpenCV 2.2 ライブラリ構成(*.lib,*.hなど)

    http://imagingsolution.blog107.fc2.com/blog-entry-275.htm

  498. Anonymous said, on February 13, 2011 at 12:40 am

    opencv_core220d.lib,opencv_highgui220d.lib,opencv_video220d.lib,opencv_ml220d.lib,opencv_legacy220d.lib,opencv_imgproc220d.lib

  499. Anonymous said, on February 13, 2011 at 1:33 pm

    opencv_imgproc220d.lib opencv_core220d.lib opencv_highgui220d.lib opencv_calib3d220d.lib

  500. Anonymous said, on February 13, 2011 at 2:07 pm

    opencv_imgproc220.lib opencv_core220.lib opencv_highgui220.lib opencv_calib3d220.lib

  501. Anonymous said, on February 13, 2011 at 2:37 pm

    0xc000007b Error Solution
    http://msoos.wordpress.com/2010/09/11/0xc000007b-error-solution/

  502. Anonymous said, on February 16, 2011 at 10:58 pm

    How to compute a homography

    http://www.cse.iitd.ernet.in/~suban/vision/geometry/node24.html

  503. Anonymous said, on February 19, 2011 at 5:09 pm

    template のままではエラーが起きてしまうので、[dvipdfmx] を追加すればよい。

    % 修正前
    documentclass[]{beamer}

    % 修正後
    documentclass[dvipdfmx]{beamer}

  504. Anonymous said, on February 19, 2011 at 5:21 pm

    CentOS 5での日本語TeX環境の構築
    http://www.compensator.net/memo/2009/08/02/tex.html

  505. Anonymous said, on February 20, 2011 at 3:29 pm

    search for files pdf ppt doc

    http://www.linkpdf.com/

  506. Anonymous said, on February 20, 2011 at 8:01 pm

    dmk21bg04 camera

    http://www.turnkey-solutions.com.au/cam_imagingsource_dmk21bg04h.htm

  507. Anonymous said, on February 21, 2011 at 12:37 pm

    centos latex

    http://monanchi.tumblr.com/post/228698063/centos-tex

  508. Anonymous said, on February 21, 2011 at 1:16 pm

    beamer dvipdfmx problem

    http://d.hatena.ne.jp/gotz_surf/20081108

  509. Anonymous said, on February 21, 2011 at 1:22 pm

    beamer and dvips

    % 修正前
    documentclass[]{beamer}

    % 修正後
    documentclass[dvips]{beamer}

  510. Anonymous said, on February 21, 2011 at 4:38 pm

    CentOS 5.3でtex環境を整えました。
    そのやり方を自分用にメモ。

    ~$ sudo yum install platex tetex*

    dvipdfmxはyumレポジトリにはないらしく、手動でインストールすることに。。。

    ~$ mkdir work
    ~$ cd work
    work$ wget http://project.ktug.or.kr/dvipdfmx/snapshot/latest/dvipdfmx-20090708.tar.gz
    work$ tar zxvf dvipdfmx-20090708.tar.gz
    work$ cd dvipdfmx-20090708

    ここ以降、パス関連で苦労しました。このパスはうまくいったときにやったパスです。

    dvipdfmx-20090708$ ./configure —prefix=/usr —with-kpathsea=/usr
    dvipdfmx-20090708$ make clean
    dvipdfmx-20090708$ make
    dvipdfmx-20090708$ sudo make install

    これで一応入ってますが、まだパスが通ってないので以下のエラーが出ると思います。

    ** WARNING ** Could not open config file “dvipdfmx.cfg”

    なので、このコマンドをするとパスが通ると思います。

    dvipdfmx-20090708$ sudo mktexlsr

    さぁ、これで使えるとおもいきや、こんなエラーが生じるでしょう。

    ** ERROR ** Could not find encoding file “H”.

    実は、このHは/usr/share/ghostscript/8.15/Resource/CMap/Hにあります。
    なので、ここにパスを通せばOKです。

    dvipdfmx-20090708$ sudo vi /usr/share/texmf/web2c/texmf.cnf
    - 345 CMAPFONTS = .;$TEXMF/fonts/cmap//
    + 345 %CMAPFONTS = .;$TEXMF/fonts/cmap//
    + 346 CMAPFONTS = .;$TEXMF/dvipdfmx/CMap//;$TEXMF/fonts/cmap//

    で、そこにパスを通します。

    dvipdfmx-20090708$ sudo ln -s /usr/share/ghostscript/8.15/Resource/CMap  /usr/share/texmf/dvipdfmx/CMap

    最後に、もう一度パスを通します。

    dvipdfmx-20090708$ sudo mktexlsr

    これで、ちゃんと動くようになってるはずです。目的のtexファイルをpdfに変換してみてください。
    なお、パス修正時にお世話になったコマンドを紹介しておきます。
    locate ・・・ ある単語が含まれるパス一覧を出してくれる。updatedbをしないと、最新情報は見れないので注意。
    make uninstall ・・・ アンインストール。5回はやったかもw。

    それでは、インストール作業頑張ってください^^

    参考サイト:
    http://groups.google.co.jp/group/fj.comp.texhax/browse_thread/thread/72b421245869931d?pli=1

  511. Anonymous said, on February 22, 2011 at 12:32 am

    Lense catalogue

    http://www.net-gmbh.com/e/documents/LenseCatalogue_April_2006_002.pdf

  512. Anonymous said, on February 22, 2011 at 1:16 am

    PDF編集機能が使えるOpenOffice.org

    http://blog.livedoor.jp/vine_user/archives/51274376.html

    【Sun PDF Import(SPI)の追加】

  513. Anonymous said, on February 23, 2011 at 12:48 am

    matrix tranpose

    http://brianmykietka.net/projects.php?project=finalmatrixtranspose

  514. Anonymous said, on February 27, 2011 at 7:14 pm

    ubuntu samba

    http://debianj.com/ubuntu/install/samba.html

  515. Anonymous said, on March 4, 2011 at 12:52 am

    無償版Visual C++でCUDAの64 bitバイナリをコンパイル

    http://blogs.yahoo.co.jp/natto_heaven/28495260.html

  516. Anonymous said, on March 11, 2011 at 1:12 am

    Configuration Properties → Linker -> General

    $(NVSDKCOMPUTE_ROOT)\C\Common\inc

    http://llpanorama.wordpress.com/2008/05/21/my-first-cuda-program/

  517. Anonymous said, on March 11, 2011 at 8:08 pm

    ツール(T)のオプション(O)のプロジェクトおよびソリューション のVC++ディレクトリ

    プラットフォームx64において

    ディレクトリを表示するプロジェクト(S)

    インクルードファイル

    $(NVSDKCOMPUTE_ROOT)\C\Common\inc

    ライブラリファイル
    $(NVSDKCOMPUTE_ROOT)\C\Common\lib

  518. Anonymous said, on March 22, 2011 at 4:49 pm

    PGI

    $ PATH=/opt/pgi/linux86-64/11.2/bin:$PATH
    $ export PATH
    $ MANPATH=$MANPATH:/opt/pgi/linux86-64/11.2/man
    $ export MANPATH
    $ LM_LICENSE_FILE=$LM_LICENSE_FILE:/opt/pgi/license.dat
    $ export LM_LICENSE_FILE

  519. Anonymous said, on March 22, 2011 at 4:51 pm

    ============================================================
    Step 4. Verify the Release Number of the Installed Software.
    ============================================================

    To verify the release number of the products you have installed,
    use the ?V option on any of the compiler commands, as illustrated
    in the following examples. If you use v instead, you also see
    the sequence of steps the compiler will use to compile and link
    programs for execution on your system.

    - For Fortran 77, use: pgf77 -V x.f
    - For Fortran 95, use: pgf95 -V x.f
    - For HPF, use: pghpf -V x.f
    - For C++, use: pgCC -V x.c
    - For ANSI C, use: pgcc -V x.c

    Note. These commands can be successfully executed even if the
    files x.f or x.c do not exist and you have not completed the
    licensing phase of the installation. The PGI compiler drivers
    support this as a quick check that you have installed the proper
    version of the compilers and have initialized your environment
    to enable access to that version.

  520. Anonymous said, on March 24, 2011 at 1:54 am

    If you have a lot of arrays of the same or related sizes you
    can use the PARAMETER attribute to create a named
    constant to use in array declarations.
    – INTEGER, PARAMETER :: ISIZE = 100
    REAL, DIMENSION(ISIZE) :: ARRAY1, ARRAY2
    REAL, DIMENSION(2*ISIZE) :: ARRAY3
    – If later you want to change the size of these arrays you only have
    to change one statement, not many.

  521. Anonymous said, on March 24, 2011 at 2:00 am

    Computer memory is arranged and addressed in a linear fashion. For 1-D Fortran arrays this is a straight forward operation. For a 2-D (or higher dimension) Fortran array a mapping operation is required. Every Fortran compiler uses the following formula for 2-D arrary addressing,

    Given: DIMENSION A(MAXROW,MAXCOL)

    Then to access element: A(I,J)

    The mapping is: INDEX = I + (J – 1)*MAXROW

  522. Anonymous said, on March 26, 2011 at 2:11 am

    When dealing with arrays CUDA follows the C model with memory allocated in row-major order (first row then second row then third row, etc.) Its usually better to think about arrays as being linearized.

    http://www.evl.uic.edu/aej/525/lecture05.htm

  523. Anonymous said, on March 26, 2011 at 11:23 am

    How Leading Dimension Is Used for Matrices

  524. Anonymous said, on March 26, 2011 at 2:37 pm

    Shared Memory Bank Conflicts in CUDA: How memory is aligned to banks

  525. Anonymous said, on March 26, 2011 at 2:50 pm

    The best way to check this would be to profile your code using the “Compute Visual Profiler”; this comes with the CUDA Toolkit. Also there’s a great section in GPU Gems 3 on this – “39.2.3 Avoiding Bank Conflicts”.

    “When multiple threads in the same warp access the same bank, a bank conflict occurs unless all threads of the warp access the same address within the same 32-bit word” – First thing there are 16 memory banks each 4bytes wide. So essentially, if you have any thread in a half warp reading memory from the same 4bytes in a shared memory bank, you’re going to have bank conflicts and serialization etc.

    OK so your first example:

    First lets assume your arrays are say for example of the type int (a 32-bit word). Your code saves these ints into shared memory, across any half warp the Kth thread is saving to the Kth memory bank. So for example thread 0 of the first half warp will save to shared_a[0] which is in the first memory bank, thread 1 will save to shared_a[1], each half warp has 16 threads these map to the 16 4byte banks. In the next half warp, the first thread will now save its value into shared_a[16] which is in the first memory bank again. So if you use a 4byte word such int, float etc then your first example will not result in a bank conflict. If you use a 1 byte word such as char, in the first half warp threads 0, 1, 2 and 3 will all save their values to the first bank of shared memory which will cause a bank conflict.

    Second example:

    Again this will all depend on the size of the word you are using, but for the example I’ll use a 4byte word. So looking at the first half warp:

    Number of threads = 32

    N = 64

    Thread 0: Will write to 0, 31, 63 Thread 1: Will write to 1, 32

    All threads across the half warp execute concurrently so the writes to shared memory shouldn’t cause bank conflicts. I’ll have to double check this one though.

    Hope this helps, sorry for the huge reply!

  526. Anonymous said, on March 26, 2011 at 3:07 pm

    Bank Conflicts

    Each bank has a bandwidth of 32 bits per clock cycle

    Successive 32-bit words are assigned to successive banks

    G80 has 16 banks

    So bank = address % 16

    Same as the size of a half-warp

    No bank conflicts between different half-warps, only within a single half-warp

  527. Anonymous said, on March 26, 2011 at 3:10 pm

    if you want dynamically allocated shared memory to contain two arrays, a and b, then you need to do something like:

    __global__ void kernel(int aSize)
    {
    extern __shared__ float sData[];
    float *a, *b;

    a = sData;
    b = &a[aSize];

  528. Anonymous said, on March 29, 2011 at 12:16 pm

    External libraries are usually provided in two forms: static libraries and shared libraries. Static libraries are the ‘.a’ files seen earlier. When a program is linked against a static library, the machine code from the object files for any external functions used by the program is copied from the library into the final executable.

    Shared libraries are handled with a more advanced form of linking, which makes the executable file smaller. They use the extension ‘.so’, which stands for shared object.

    An executable file linked against a shared library contains only a small table of the functions it requires, instead of the complete machine code from the object files for the external functions. Before the executable file starts running, the machine code for the external functions is copied into memory from the shared library file on disk by the operating system–a process referred to as dynamic linking.

    Dynamic linking makes executable files smaller and saves disk space, because one copy of a library can be shared between multiple programs. Most operating systems also provide a virtual memory mechanism which allows one copy of a shared library in physical memory to be used by all running programs, saving memory as well as disk space.

    Furthermore, shared libraries make it possible to update a library without recompiling the programs which use it (provided the interface to the library does not change).

    Because of these advantages gcc compiles programs to use shared libraries by default on most systems, if they are available. Whenever a static library ‘libNAME.a’ would be used for linking with the option -lNAME the compiler first checks for an alternative shared library with the same name and a ‘.so’ extension.

  529. Anonymous said, on April 2, 2011 at 10:32 am

    Occupance
    occupancy:英和で調べると占有とか出てくるが、ここではwarpの占有率を意味する。

    あるCUDA KernelがGPU上の最大可能warp数のうちのどれだけを利用しているかを表す。

    chipの性能をフルに発揮している状態なら1.0になる。

    Compute Capability 1.3であれば一つのSMに対して1024のthreadを同時に走らせることができれば1.0になる。

    もちろん1つのBlockでは512個のthreadまでしか利用できないので、複数のBlockを同時に実行できるようなKernelを用意しないと1.0は出せない。

    多くのthreadを走らせてoccupancyを上げたいときには、threadあたりの使用レジスタ数を抑える必要がある。

    またBlockあたりのShared Memoryの量も抑える必要がある。

    たとえば、Blockにthreadが512個あり、各threadのレジスタの使用が16以下でShared Memoryの使用量が8Kib以下であれば同時に2Blockを走らせることが可能になるので、この時にはoccupancy 1.0を達成できる。

    Kernelのレジスタ数を制限したければnvccのオプションに–maxrregcount をつければいい。Nは1つのKernelの最大レジスタ数を指定する。

    http://d.hatena.ne.jp/worker_cat/20091106/1257524344

  530. Anonymous said, on April 7, 2011 at 10:07 pm

    Multiple figures on a page in Latex

    Heres the code to put multiple figures, side by side, on a page in Latex:

    \documentclass[a4paper,12pt]{article}
    \usepackage{epsfig}
    \begin{document}

    \begin{figure}
    \centering
    \begin{tabular}{cc}
    \epsfig{file=figure1.eps,width=0.5\linewidth,clip=} &
    \epsfig{file=figure2.eps,width=0.5\linewidth,clip=} \\
    \epsfig{file=figure3.eps,width=0.5\linewidth,clip=} &
    \epsfig{file=figure4.eps,width=0.5\linewidth,clip=}
    \end{tabular}
    \end{figure}

    \end{document}

  531. Anonymous said, on April 9, 2011 at 11:51 am

    image based lighting
    http://homepage.mac.com/eric.lee/cs348b/

  532. Anonymous said, on April 9, 2011 at 7:27 pm

    /* Simple test app for high dynamic range imaging using relatively cheap
    * cameras. This can be used to photograph very dark scenes or scenes with
    * a wide brightness range by exploiting CCD noise. While noise in the
    * camera’s CCD causes almost no image to be observable, the object
    * being photographed does affect the noise’s mean value. This effect is
    * similar to taking very long exposures with a film camera: it is only
    * effective on very still objects.
    *
    * This needs to be run once with the camera’s lens covered to capture
    * a black level for the CCD. This will be saved to “hdr.result”. Rename
    * it and pass that filename on the command line to future invocations.
    * This black level will need to be recalibrated if any of the camera’s
    * settings change, and a more accurate black level is necessary to get
    * more accurate final images.
    *
    * While running, the slider adjusts the scale factor (x10) used to display
    * the HDR image being built. Press any key to quit capturing and write the
    * result to hdr.result, an OpenCV FileStorage containing a single “image”
    * in 32-bit floating point.
    */
    http://svn.navi.cx/misc/trunk/vision/src/hdr.cpp

  533. Anonymous said, on April 9, 2011 at 10:07 pm

    HDR Mathlab
    http://cybertron.cg.tu-berlin.de/pdci08/hdr/downloads.html

  534. Anonymous said, on April 11, 2011 at 1:46 am

    CameraResponse::SolveForResponse(vector& photos, float lambda, int nsamples) {
    int i, j, k;

    // Get number of images
    int nimages = (int)photos.size();
    if (nimages GetWidth();
    int height = tmpimage->GetHeight();
    delete tmpimage;

    // Choose sample points
    vector samples_x;
    vector samples_y;
    for(i = 0; i < nsamples; i++) {
    samples_x.push_back( rand() % width );
    samples_y.push_back( rand() % height );
    }

    // Create and zero out equation matrices
    TNT::Array2D Ar(nsamples*nimages+n-1, n+nsamples, 0.f);
    TNT::Array2D Ag(nsamples*nimages+n-1, n+nsamples, 0.f);
    TNT::Array2D Ab(nsamples*nimages+n-1, n+nsamples, 0.f);
    TNT::Array1D br(nsamples*nimages+n-1, 0.f);
    TNT::Array1D bg(nsamples*nimages+n-1, 0.f);
    TNT::Array1D bb(nsamples*nimages+n-1, 0.f);

    k = 0; // k will hold the index of the current equation (constraint)
    // first we setup constraints from the image pixels, weighted appropriately
    // these equations include the shutter times
    for(j = 0; j < nimages; j++) {
    STImage curimage(photos[j].filename.c_str());
    printf("Image %i…\n", j+1);
    float ln_shutter = log(photos[j].shutter);
    for(i = 0; i < nsamples; i++) {
    STColor4ub pixval = curimage.GetPixel(samples_x[i], samples_y[i]);

    float wij_r = Weight(pixval.r);
    Ar[k][pixval.r] = wij_r;
    Ar[k][n+i] = -wij_r;
    br[k] = wij_r * ln_shutter;

    float wij_g = Weight(pixval.g);
    Ag[k][pixval.g] = wij_g;
    Ag[k][n+i] = -wij_g;
    bg[k] = wij_g * ln_shutter;

    float wij_b = Weight(pixval.b);
    Ab[k][pixval.b] = wij_b;
    Ab[k][n+i] = -wij_b;
    bb[k] = wij_b * ln_shutter;

    k++;
    }
    }

    // next we include the smoothness equations, these are the same for all colors
    for(i = 0; i < n-2; i++) {
    float w = Weight(i);

    Ar[k][i] = lambda * w;
    Ar[k][i+1] = -2 * lambda * w;
    Ar[k][i+2] = lambda * w;

    Ag[k][i] = lambda * w;
    Ag[k][i+1] = -2 * lambda * w;
    Ag[k][i+2] = lambda * w;

    Ab[k][i] = lambda * w;
    Ab[k][i+1] = -2 * lambda * w;
    Ab[k][i+2] = lambda * w;

    k++;
    }

    // finally, fix the curve such that g(0) = 128, same for all curves
    Ar[k][128] = 1;
    Ag[k][128] = 1;
    Ab[k][128] = 1;
    k++;

    // now solve the system of equations in the least squares sense
    printf("Solving equations…\n");
    JAMA::QR solver_r(Ar);
    JAMA::QR solver_g(Ag);
    JAMA::QR solver_b(Ab);
    if (!solver_r.isFullRank() || !solver_g.isFullRank() || !solver_b.isFullRank()) {
    printf(“An A matrix is not full rank…\n”);
    exit(-1);
    }

    TNT::Array1D g_curve_r = solver_r.solve(br);
    TNT::Array1D g_curve_g = solver_g.solve(bg);
    TNT::Array1D g_curve_b = solver_b.solve(bb);

    // g_curve now holds the curve + the log(E) values for the samples,
    // record the first piece into this response’s arrays
    for(i = 0; i < n; i++) {
    response_r[i] = g_curve_r[i];
    response_g[i] = g_curve_g[i];
    response_b[i] = g_curve_b[i];
    }

    return ST_OK;
    }

  535. Anonymous said, on April 11, 2011 at 1:54 am

    前回の続きで、今回はcv::Mat_に関してです。内容はほぼ前回のコードの置き換えなので説明は少ないです。記事の構成も同じです。
    画像の作成

    cv::Mat_は見たままですが、cv::Matに対して型Tを与えて用いるためのクラスです。そのため、変数を定義する際に画素の型を与える必要があります。 cv::Matでは画素の型はOpenCVの定数でしたが、cv::Mat_ではC++の型のことです。
    cv::Mat_ image( 高さ, 幅 );

    // グレースケール画像(8bit)画像
    cv::Mat_ image( height, width );

    // RGB画像(24bit)画像
    cv::Mat_ image( height, width );
    画像の入出力

    画像の入力は、cv::Matと同様です。
    // グレースケール画像(8bit)画像
    cv::Mat_ image = cv::imread( “ファイル名”, 0 );

    // RGB画像(24bit)画像
    cv::Mat_ image = cv::imread( “ファイル名”, 1 );

    画像の出力も同様。
    cv::imread( “ファイル名”, image );
    任意の画素へのアクセス

    cv::Mat_だと、変数を定義する際に型を与えているため、任意の画素へとアクセスする際に型を与える必要がありません。以下の例では、位置(x,y)の画素に0xffを代入して白画素にしています。
    // グレースケール画像(8bit)画像
    image( y, x ) = 0xff;

    // RGB画像(24bit)画像
    image( y, x )[ 0 ] = 0xff;
    image( y, x )[ 1 ] = 0xff;
    image( y, x )[ 2 ] = 0xff;
    画像全体の走査

    cv::Matの時と同様に3つのアクセス方法で画像全体を走査します。
    任意の画素へのアクセスによる走査
    // グレースケール画像(8bit)画像
    for( int y = 0 ; y < image.rows ; ++y )
    {
    for( int x = 0 ; x < image.cols ; ++x )
    {
    image( y, x ) = 0xff;
    }
    }

    // RGB画像(24bit)画像
    for( int y = 0 ; y < image.rows ; ++y )
    {
    for( int x = 0 ; x < image.cols ; ++x )
    {
    image( y, x )[ 0 ] = 0xff;
    image( y, x )[ 1 ] = 0xff;
    image( y, x )[ 2 ] = 0xff;
    }
    }
    ポインタアクセスによる走査
    // グレースケール画像(8bit)画像
    for( int y = 0 ; y < image.rows ; ++y )
    {
    unsigned char *p = &image( y, 0 );
    for( int x = 0 ; x < image.cols ; ++x )
    {
    *p = 0xff;
    ++p;
    }
    }

    // RGB画像(24bit)画像
    for( int y = 0 ; y < image.rows ; ++y )
    {
    cv::Vec3b *p = &image( y, 0 );
    for( int x = 0 ; x < image.cols ; ++x )
    {
    ( *p )[ 0 ] = 0xff;
    ( *p )[ 1 ] = 0xff;
    ( *p )[ 2 ] = 0xff;
    ++p;
    }
    }
    MatIterator_による走査
    // グレースケール画像(8bit)画像
    cv::MatIterator_ itr = image.begin();
    for( ; itr != image.end() ; ++itr )
    {
    *itr = 0xff;
    }

    // RGB画像(24bit)画像
    cv::MatIterator_ itr = image.begin();
    for( ; itr != image.end() ; ++itr )
    {
    ( *itr )[ 0 ] = 0xff;
    ( *itr )[ 1 ] = 0xff;
    ( *itr )[ 2 ] = 0xff;
    }

  536. Anonymous said, on April 13, 2011 at 12:55 pm

    firefox 4

    ./firefox-bin: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

    or

    ./firefox-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9′ not found (required by /home/cameron/firefox/libxul.so)

    To fix this follow these steps.
    cd ~
    download the file: firefox-4.0.tar.bz2
    tar xvf firefox-4.0.tar.bz2
    cd firefox
    download the fedora rpm: libstdc++
    rpm2cpio libstdc++-4.3.0-8.i386.rpm | cpio -i –make-directories
    #note the lack of / at front of usr/lib in the line below
    mv usr/lib/libstdc++.so.6* .
    rmdir usr/lib usr

  537. Anonymous said, on April 15, 2011 at 12:25 am

    SDL

    You’re not linking to the SDL library. Your command should look something like this:

    gcc testcursor.c -lsdl

    That’s assuming you’re using the SDL that came with your Linux distro. If you downloaded it and built it by hand, you might need something more complicated, like this:

    gcc -I/usr/local/include/sdl testcursor.c -L/usr/local/lib -lsdl

    The -I and -L options tell gcc where to look for include files and libraries, respectively. The first command doesn’t need them because if you use the stock SDL for your system, they’re in the default locations

  538. Anonymous said, on April 15, 2011 at 12:28 am

    Setting up SDL in Linux

  539. Anonymous said, on April 15, 2011 at 12:32 am

    SDL-devel-1.2.10-8.el5.x86_64.rpm – CentOS 5 (RHEL 5) – CentOS (RHEL)

  540. Anonymous said, on April 15, 2011 at 12:36 am

    g++ -I/usr/local/include/SDL -L/usr/local/lib -o test ‘/home/desk/C/test.cc’ -lSDL
    export LD_LIBRARY_PATH=”/usr/local/lib”

  541. Anonymous said, on April 15, 2011 at 12:55 am

    How to display bitmaps using Simple Direct Media Layer(SDL)

  542. 
    /*
    loadimage.cpp
     
    compile by: g++ -o loadimage loadimage.cpp -I/usr/include -L/usr/local/lib -lSDL -lSDL_image
    execute by: ./loadimage
    */
     
    #include <SDL/SDL.h>
    #include <SDL/SDL_image.h>
    #include <stdlib.h>
     
    bool load_image (   SDL_Surface *screen, char *image_name, int x, int y )
    {
      SDL_Surface *image;
      SDL_Rect source, offset;	//offset is the destination
                                                                                    
      image = IMG_Load(  image_name );
      if ( image == NULL ) {
        printf ( "Unable to load image\n" );
        return false;
      }
      source.x = 0;
      source.y = 0;
      source.w = image->w;	//display the whole image
      source.h = image->h;
      offset.x = x;         //position to display the image
      offset.y = y;
      offset.w = image->w;	//the width and height here actually are NOT used
      offset.h = image->h;
                                                                                    
      //Draws the image data to the screen: (image, source) is the source, (screen, offset) is the destination
      SDL_BlitSurface ( image, &source, screen, &offset );
      //free the resources allocated to image
      SDL_FreeSurface ( image );
      return true;
    }
                                                                                    
    int main()
    {
      SDL_Surface *screen;
                                                                                    
      //initialize video system
      if ( SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
            fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
            exit(1);
      }
      //ensure SDL_Quit is called when the program exits
      atexit(SDL_Quit);
                                                                                    
      //set video mode of 640 x 480 with 16-bit pixels
      screen = SDL_SetVideoMode(640, 480, 16, SDL_SWSURFACE);
      if ( screen == NULL ) {
            fprintf(stderr, "Unable to set 640x480 video: %s\n", SDL_GetError());
            exit(1);
      }
                                                                                    
      //put image near center of screen
      if ( !load_image ( screen, "test-image.gif", 320, 240 ) ) {
            exit ( 1 );
      }
      //update the entire screen
      SDL_UpdateRect ( screen, 0, 0, 0, 0 );
                                                                                    
      SDL_Delay ( 4000 );   //delay 4 seconds before exit
                                                                                    
      return 0;
    }
    
    
  543. Anonymous said, on April 19, 2011 at 12:42 am

    GLT ZPR – Zoom, Pan and Rotate

    http://www.nigels.com/glt/gltzpr/

  544. Anonymous said, on April 19, 2011 at 12:53 am

    Playing with OpenGL – Mouse Interaction

    I haven’t worked with OpenGL in a long time. The last time I wrote anything using OpenGL was in college when I took a class on it. Well, I recently bought the OpenGL SuperBible, and from reading the first bit of it, it sounds like some interesting stuff has developed. There’s now this OpenGL shading language? I don’t remember anything about that, at least. There’s also a trimmed down version of OpenGL for mobile devices too, and that’s really cool.

    Anyways, I remember in the class I never ended up with an OpenGL app that would allow for proper mouse rotation of a 3d object. Mouse interaction was never really assigned in that class, and I remember spending a lot of my time trying to figure out the math the teacher was having us do instead.

    So I thought now that I’m jumping back into OpenGL related stuff, my first project should be revisiting that very simple, yet often overlooked bit of code that handles mouse interaction. I reviewed some of the code I had written in the class, and it had the basic idea right, but not enough thought put into it.

    So I started fresh. I’ve learned some interesting things:

    ROTATION
    If you rotate the camera about your scene, then you won’t be able to spin a translated object in place (what you get is a big swing around the object, rather than watching the object spin). So it seems one wants to rotate the the whole scene before drawing it. This is, of course, to mimic what is seen in 3ds Max.

    TRANSLATION
    This is probably the easiest part of the math involved. Since translation from this projects point of view is moving about the screen plane, then we only have to move in two dimensions (The third dimension is zoom). All that needs be done is move our eyeball AND the point we’re looking at in parallel.

    ZOOM
    This one is a bit tricky. The effect we want is to move our eye closer to the point we’re looking at. This point is not necessarily the object. Imagine you have an eye location E and a focus point F. Moving our eye towards F involves a little bit of vector math. If we create a vector from E to F, we are half way there. To do that, subtract F from E in each dimension:

    Vx = Fx – Ex;
    Vy = Fy – Ey;
    Vz = Fz – Ez;

    Now we simple move our Eye point along this vector. Multiple the vector by some scaling factor and add

    newEye = E + V*scale;

    or

    newEyex = Ex + Vx*scale;
    newEyey = Ey + Vy*scale;
    newEyez = Ez + Vz*scale;

    When you think about the math, it makes sense. When you look at the math, it’s easy to get confused.

    At any rate, here’s my program. I’ve tried to put it together so you don’t need to modify your paths to get it to build (the glut library is included).

  545. Anonymous said, on April 27, 2011 at 6:56 pm

    CUDA 4.0 RC

    http://blog.cuvilib.com/2011/03/09/nvidia-cuda-4-0-tips-and-issues/

  546. Anonymous said, on May 2, 2011 at 7:40 pm

    #!/bin/sh
    for filename in *.png
    do
    convert $filename ${filename%png}eps
    done

  547. Anonymous said, on May 4, 2011 at 1:15 pm

    #!/bin/sh
    dirname=tmpdir
    for i in guest*
    do
    echo $i
    echo “export LANG=C” >>$i/.bashrc
    cat ./$i/.bashrc
    rm -rf $i/$dirname
    ls -la $i
    done

  548. Anonymous said, on May 4, 2011 at 1:21 pm

    NVSDKCOMPUTE_ROOT=C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2
    NVTOOLSEXT_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\nvToolsExt\

  549. Anonymous said, on May 4, 2011 at 7:09 pm

    [HT採用の確認]
    HTを採用しているかどうかはを確認するのは、ちょっと一筋縄ではいかないようだ。

    例えば $ cat /proc/cpuinfo で physical id,siblings の2つの項目があるかどうかを確認する、
    という方法があるらしいのだが、実行結果ではHTがOFFのマシンでもこのふたつの項目は存在した。

    それと、$ cat /proc/cpuinfo | grep flags の表示で “ht”というのが存在するか。
    これも、”ht” があるからといってHTの機能が有効というわけではなく、あくまでOSとして
    HTをサポートしているだけ、ということらしい。

    コマンドだけで確認するのにてっとり早いのは、例えば
    $ cat /proc/cpuinfo | grep processor の結果で、processor :0,1,2,3と並んでいたら、
    それぞれのphysical idを確認してみる。
    processor :0,1のphysical idが同一であれば、物理的にひとつのCPUとして
    捉えることができる(てっとり早いといっておきながら、なんだか書いててややこしいなぁ….)。

    HTが有効で物理cpuが2つ、仮想cpu4つの場合、表示例はこんな感じ。

    $ cat /proc/cpuinfo | grep “physical id”
    physical id : 0
    physical id : 0
    physical id : 3
    physical id : 3

    あとは、該当するマシンのプロセッサナンバーをIntelのサイトで確認すれば、
    HTが有効かどうかわかる。プロセッサナンバーを調べるには、以下を実行。

  550. Anonymous said, on May 4, 2011 at 7:10 pm

    $ cat /proc/cpuinfo | grep “model name”

  551. Anonymous said, on May 6, 2011 at 1:05 pm

    Back up script

    http://www.mikerubel.org/computers/rsync_snapshots/

  552. Anonymous said, on May 7, 2011 at 12:50 pm

    Back up like an expert with rsync

    http://www.linux.com/news/enterprise/storage/8200-back-up-like-an-expert-with-rsync

  553. Anonymous said, on May 11, 2011 at 11:29 pm

    cublas cuda fortran
    http://www.nvidia.com/content/PDF/sc_2010/theater/Ruetsch_SC10.pdf

  554. Anonymous said, on May 12, 2011 at 7:20 pm
    
    #include <iostream>
    
    int main() {
    
        using std::cout;
    
        cout &lt;&lt; &quot;Hello World.\n&quot;;
    
        return 0;
    }
    
    

    vector等も同様に利用できます。局所的に利用するのがお勧めですが、例えusingをmainの外に宣言してもusing namespace stdよりは汚染を最小限に留めます。

  555. Anonymous said, on May 17, 2011 at 11:48 am

    OpenIDでサーバ立てたりする時に必要だけど、普通のhttpsサーバ建てとかで検索できるのとはやり方が違うので、覚え書き。

    DSA パラメータを生成
    openssl dsaparam -out parameter.pem 1024
    生成したパラメータを使って DSA 秘密鍵を生成
    openssl gendsa -out privatekey-crypt.pem -des3 parameter.pem
    秘密鍵に対応する公開鍵を生成
    openssl dsa -in privatekey-crypt.pem -pubout -out publickey.pem
    秘密鍵のパスワード削除
    openssl dsa -in privatekey-crypt.pem -out privatekey.pem

    パスワードはhttpsのようにhttpd起動時の問題があるわけではないので、削除する必要はないのかもしれないが、いつもの癖でやった。
    いまは反省している。

  556. Anonymous said, on May 18, 2011 at 1:03 am

    Doing base64 encoding and decoding in OpenSSL C++

  557. Anonymous said, on May 18, 2011 at 1:04 am

    RSA encryption using OpenSSL and C (or C++)

  558. Anonymous said, on May 18, 2011 at 1:07 am

    RSA encryption using OpenSSL and C

    CONTENTS
    ========

    bin/mykey.priv – Example private key (Don’t use this for real projects!!!)
    bin/mykey.pub – Example public key (Again, don’t use this outside testing)
    bin/openssl.exe – Binary file required to generate RSA keypairs (OpenSSL 1.0.0c)
    lib/ – Static openssl libraries compiled by me (OpenSSL 1.0.0c)
    include/ – OpenSSL header files (OpenSSL 1.0.0c)
    doc/ – The documentation you are reading now, congrats!
    encrypt.c – Example on encryption with RSA
    decrypt.c – Example on decryption with RSA

  559. Anonymous said, on May 20, 2011 at 11:58 am

    Script to remove exe file;

    try these lines

    Code:

    #!/bin/bash
    for name in `tree -ifp | grep “\[-..x” | tr -s ” ” | cut -d ” ” -f2`
    do
    rm $name
    done

    Quote:
    tree -ifp
    will give you list of all dirs recursively including all subdirectories with FAP and relative pathname

    Quote:
    grep “\[-..x”
    will fetch only executable files from FAP with relative pathname

    Quote:
    tr -s ” ”
    will squeeze the space between the two columns i.e. FAP and path to file.

    Quote:
    cut -d ” ” -f2
    will fetch the second column i.e. relative path and filename.

    these filenames with relative pathname are saved in
    Quote:
    name
    variable and then the
    Quote:
    rm
    command removes those file.

  560. Anonymous said, on May 20, 2011 at 12:08 pm
    
    echo "remove executable files"
    for name in `tree -ifp | grep "\[-..x" | tr -s " " | cut -d " " -f2`
    do
    echo "remove" $name
    rm $name
    done
    echo "remove .swp file"
    find . -name "*.swp" -type f -delete
    echo "remove .~ file"
    find . -name "*.~" -type f -delete
    
    
  561. Anonymous said, on May 21, 2011 at 10:08 am

    Building a Store Application With MySQL++ and C/C++

  562. Anonymous said, on May 23, 2011 at 9:02 am

    CPP time

    http://www1.gantep.edu.tr/~cpp/misc-time.php

  563. Anonymous said, on May 25, 2011 at 11:55 pm

    Redhat or Centos, you want several of the mingw packages from http://download.fedora.redhat.com/pub/epel/5/i386/repoview/M.group.html (see EPEL how-to then yum install mingw32-binutils and mingw32-gcc-g++ at minimum)

  564. Anonymous said, on May 26, 2011 at 12:01 am

    Mingw and openssl

    http://www.limitlessfx.com/mingw-openssl-qt4-for-windows-on-linux.html

  565. Anonymous said, on May 26, 2011 at 1:34 am

    A Tiny MySQL++ Tutorial; C++ and MySQL; MySQL++ Example
    http://codingrecipes.com/a-tiny-mysql-tutorial-c-and-mysql-example

  566. Anonymous said, on May 26, 2011 at 1:38 am

    For me, handling exception is one of the most difficult programming problems. Nevertheless, C++ uses exceptions to report errors (and so should you when an error cannot be handled locally), so you have to deal with them. The exception mechanism is nod “good” or “bad” as it is, but it can be overused (or exception can be ignored alltogether, which might be even worse).
    Guidelines for throwing:
    - Use exceptions only to report errors, not as general control structures
    - Throw exceptions only when the error cannot be handled locally
    - Also throw exceptions in library code: the host application wants to control the user output (imagine std::vector would write something to std::cerr when an error occurs instead of throwing a std::out_of_range)
    - Never allow an exception to leave a destructor

    Guidelines for catching:
    - Never allow an exception to leave a destructor
    - Assume that an exception that can be thrown will be thrown
    - When writing “real” applications, design for exception safe code – don’t make it an “afterthought”
    - Writing exception safe code doesn’t mean ‘try’-ing. Learn what code can throw and what the effects would be if an exception was thrown at any given location.

  567. Anonymous said, on May 26, 2011 at 1:49 am
    
    int main()
    {
        try
        {
            // Do Wrok
        }
        catch(std::exception const&amp; e)
        {
             Log(e.what());
             // If you are feeling mad (not in main) you could rethrow! 
        }
        catch(...)
        {
             Log("UNKNOWN EXCEPTION");
             // If you are feeling mad (not in main) you could rethrow! 
        }
    }
    
    
  568. The use of exceptions said, on May 26, 2011 at 2:07 am

    This following example program demonstrates the use of exceptions:

    
    #include <string>      // for string
    #include <stdexcept>   // for exception, runtime_error, out_of_range
    #include <iostream>    // for cout
    
    
    int main ()
    {
        // First we'll incite and catch an exception from the C++ Standard
        // library class std::string by attempting to replace a substring
        // starting at a position beyond the end of the string object.
        try {
            std::string ().replace (100, 1, 1, 'c');
        }
        catch (std::out_of_range &e) {
    
            // Print out the exception string, which in this implementation
            // includes the location and the name of the function that threw
            // the exception along with the reason for the exception.
            std::cout << "Caught an out_of_range exception: "
                      << e.what () << '\n';
        }
        catch (std::exception &e) {
    
            std::cout << "Caught an exception of an unexpected type: "
                      << e.what () << '\n';
        }
        catch (...) {
            std::cout << "Caught an unknown exception\n";
        }
        
        // Throw another exception.
        try {
            throw std::runtime_error ("a runtime error");
        }
        catch (std::runtime_error &e) {
            std::cout << "Caught a runtime_error exception: "
                      << e.what () << '\n';
        }
        catch (std::exception &e) {
            std::cout << "Caught an exception of an unexpected type: "
                      << e.what () << '\n';
        } 
        catch (...) {
            std::cout << "Caught an unknown exception\n";
        }
       
        return 0;
    }
    
    

    The exact output of the program is specific to the compiler used to compile it and to the location of the library headers but may look something like this:

    Caught an out_of_range exception: /usr/local/stdcxx/include/string.cc:422: std::string& std::string::replace(size_type, size_type, size_type, char_type): argument value 100 out of range [0, 0)
    Caught a runtime_error exception: a runtime error

  569. Anonymous said, on May 26, 2011 at 7:25 pm
    
    CC = gcc
    CFLAGS = -Wall
    # rand_win.c で使われている CreateDCA, GetDeviceCaps などをリンクするために gdi32 ライブラリが必要
    LDFLAGS = -lcrypto -lgdi32
    TARGET = \
    	hmac_sha256_base64.exe
    
    .SUFFIXES: .exe .c .o
    
    .c.o:
    	$(CC) $(CFLAGS) -c -o $@ $&lt;
    
    .o.exe:
    	$(CC) -o $@ $&lt; $(LDFLAGS)
    
    default: $(TARGET)
    
    clean:
    	rm -rf *.o *.exe
    
    
  570. A simple makefile that compiles multiple C++ source files said, on May 27, 2011 at 12:07 am
    
    # This is a simple makefile that compiles multiple C++ source files
    
    # set the names here to be the names of your source files with the
    # .cxx or .cpp replaced by .o
    # Be *** SURE *** to put the .o files here rather than the source files
    
    Objects =  midC.o textline.o
    
    #------------ no need to change between these lines -------------------
    CFLAGS = -g -Wall
    .SUFFIXES: .cxx .cpp
    
    .cxx.o:
    	g++ $(CFLAGS) -c $&lt;
    
    .cpp.o:
    	g++ $(CFLAGS) -c $&lt;
    #------------ no need to change between these lines -------------------
    
    
    #------------ targets --------------------------------------------
    # describe how to create the target
    
    a.out: $(Objects)
    	g++ $(CFLAGS) $(Objects) -o a.out 
    
    clean:
    	rm -f $(Objects) a.out
    
    
    #------------ dependencies --------------------------------------------
    # put the .o that depends on a .h, then colon, then TAB, then the .h
    
    textline.o: textline.h
    
    midC.o: textline.h
    
    
  571. Anonymous said, on May 27, 2011 at 12:09 am
    
    # This is a simple makefile that compiles multiple C++ source files
    
    # set the names here to be the names of your source files with the
    # .cxx or .cpp replaced by .o
    # Be *** SURE *** to put the .o files here rather than the source files
    
    ProjectObjects =  theProject.o class1.o class2.o
    OtherProjectObjects =  other.o
    
    #------------ no need to change between these lines -------------------
    CFLAGS = -g -Wall
    .SUFFIXES: .cxx .cpp
    
    .cxx.o:
            g++ $(CFLAGS) -c $&lt;
    
    .cpp.o:
            g++ $(CFLAGS) -c $&lt;
    #------------ no need to change between these lines -------------------
    
    
    #------------ targets --------------------------------------------
    # describe how to create the targets - often there will be only one target
    
    all: theProject other
    
    theProject: $(ProjectObjects)
            g++ $(CFLAGS) $(ProjectObjects) -o theProject 
    
    other: $(OtherProjectObjects)
            g++ $(CFLAGS) $(OtherProjectObjects) -o other 
    
    clean:
            rm -f $(ProjectObjects) $(OtherProjectObjects) theProject other
    
    #------------ dependencies --------------------------------------------
    # put the .o that depends on a .h, then colon, then TAB, then the .h
    
    class1.o:       class1.h
    class2.o:       class2.h
    theProject.o:   class1.h class2.h
    
    
  572. Anonymous said, on May 27, 2011 at 12:33 am

    client: client.c
    $(CC) $? -o $@

    server: server.c
    $(CC) $? -o $@

    $<
    If you only need the first dependency, then $< is for you. Using $< can be safer than relying on $^ when you have only a single dependency that needs to appear in the commands executed by the target. If you start by using $^ when you have a single dependency, if you then add a second, it may be problematic, whereas if you had used $< from the beginning, it will continue to work. (Of course, you may want to have all dependencies show up. Consider your needs carefully.)

    .c:
    $(CC) -o $@ $@.c

    This rule says that for any target that corresponds to a .c file, make should compile it using the name of the implicit target as the output, and the name plus the .c extension as the file to compile. For example,

    % make test_executable

    would run

    gcc -o test_executable test_executable.c

    Replacing Text
    It is possible to create a new macro based on replacing part of an old macro. For instance, given a list of source files, called SRC, you might wish to generate the corresponding object files, stored in a macro called OBJ. To do so, you can specify that OBJ is equivalent to SRC, except with the .c extension replaced with a .o extension:

    OBJ = $(SRC:.c=.o)

    http://www.cprogramming.com/tutorial/makefiles_continued.html

  573. Anonymous said, on May 27, 2011 at 7:54 am

    Installing Alternate GCC Compiler on Fedora
    http://www.mjmwired.net/resources/mjm-fedora-gcc.html

  574. Anonymous said, on May 27, 2011 at 12:51 pm

    Mingw+Openssl

    cd openssl-1.0.0d
    patch -p1 < openssl-1.0.0d-configure.patch
    ./config –cross-compile-prefix=i686-pc-mingw32- –prefix=/tmp/openssh mingw
    make
    sudo make install

    OpenSSL für Windows/MinGW unter Linux CrossCompilieren
    http://marc.waeckerlin.org/computer/blog/openssl_fuer_windows_mingw_unter_linux_crosscomilieren

  575. Anonymous said, on May 27, 2011 at 2:47 pm
    
    # Example Makefile for ArcEngine C++ Programming on Linux
    
    #
    # The PROGRAM macro defines the name of the program or project.  It
    # allows the program name to be changed by editing in only one
    # location
    #
    
    PROGRAM = basic_sample
    
    #
    # Command line parameters: Edit these parameters so that you can 
    # easily run the sample by typing "make -f Makefile.Linux run".
    # 
    # You will need to:
    # (1) Describe parameters here. ex: IN_SHAPEFILE is the input shapefile
    # (2) Define parameters below this comment box. 
    #       ex: IN_SHAPEFILE = /mycomp/data/shapefile.shp
    # (3) Add the parameters to the run target at the end of this file 
    #       ex: ./$(PROGRAM) $(IN_SHAPEFILE)
    #
    
    #
    # The INCLUDEDIRS macro contains a list of include directories
    # to pass to the compiler so it can find necessary header files.
    #
    # The LIBDIRS macro contains a list of library directories
    # to pass to the linker so it can find necessary libraries.
    #
    # The LIBS macro contains a list of libraries that the the
    # executable must be linked against.
    #
    
    INCLUDEDIRS = \
    	-I$(ARCENGINEHOME)/include \
    	-I/usr/X11R6/include
    
    
    LIBDIRS = \
    	-L$(ARCENGINEHOME)/bin \
    	-L/usr/X11R6/lib
    
    
    LIBS = -larcsdk
    
    #
    # The CXXSOURCES macro contains a list of source files.
    #
    # The CXXOBJECTS macro converts the CXXSOURCES macro into a list
    # of object files.
    #
    # The CXXFLAGS macro contains a list of options to be passed to
    # the compiler.  Adding "-g" to this line will cause the compiler
    # to add debugging information to the executable.
    #
    # The CXX macro defines the C++ compiler.
    #
    # The LDFLAGS macro contains all of the library and library
    # directory information to be passed to the linker.
    #
    
    CXXSOURCES = basic_sample.cpp       # list of source files
    CXXOBJECTS = $(CXXSOURCES:.cpp=.o)  # expands to list of object files
    CXXFLAGS = -DESRI_UNIX $(INCLUDEDIRS)
    CXX = g++
    
    LDFLAGS = $(LIBDIRS) $(LIBS)
    
    #
    # Default target: the first target is the default target.
    # Just type "make -f Makefile.Linux" to build it.
    #
    
    all: $(PROGRAM)
    
    #
    # Link target: automatically builds its object dependencies before
    # executing its link command.
    #
    
    $(PROGRAM): $(CXXOBJECTS)
    	$(CXX) -o $@ $(CXXOBJECTS) $(LDFLAGS)
    
    #
    # Object targets: rules that define objects, their dependencies, and
    # a list of commands for compilation.
    #
    
    basic_sample.o: basic_sample.cpp basic_sample.h
    	$(CXX) $(CXXFLAGS) -c -o basic_sample.o basic_sample.cpp
    
    #
    # Clean target: "make -f Makefile.Linux clean" to remove unwanted objects and executables.
    #
    
    clean:
    	$(RM) -f $(CXXOBJECTS) $(PROGRAM)
    
    #
    # Run target: "make -f Makefile.Linux run" to execute the application
    #             You will need to add $(VARIABLE_NAME) for any command line parameters 
    #             that you defined earlier in this file.
    # 
    
    run:
              ./$(PROGRAM)
    
    
  576. Vimrc file said, on May 27, 2011 at 5:52 pm
    
    set nocompatible    " use vim defaults
    set ls=2            " allways show status line
    set tabstop=4       " numbers of spaces of tab character
    set shiftwidth=4    " numbers of spaces to (auto)indent
    set scrolloff=3     " keep 3 lines when scrolling
    set showcmd         " display incomplete commands
    set hlsearch        " highlight searches
    set incsearch       " do incremental searching
    set ruler           " show the cursor position all the time
    set visualbell t_vb=    " turn off error beep/flash
    set novisualbell    " turn off visual bell
    set nobackup        " do not keep a backup file
    set number          " show line numbers
    set ignorecase      " ignore case when searching
    "set noignorecase   " don't ignore case
    set title           " show title in console title bar
    set ttyfast         " smoother changes
    "set ttyscroll=0        " turn off scrolling, didn't work well with PuTTY
    set modeline        " last lines in document sets vim mode
    set modelines=3     " number lines checked for modelines
    set shortmess=atI   " Abbreviate messages
    set nostartofline   " don't jump to first character when paging
    set whichwrap=b,s,h,l,,[,]   " move freely between files
    "set viminfo='20, 0|if line("'\"") &lt;= line(&quot;$&quot;)|exe(&quot;norm '\&quot;&quot;)|else|exe &quot;norm $&quot;|endif|endif
    
        &quot; Filetypes (au = autocmd)
        au FileType helpfile set nonumber      &quot; no line numbers when viewing help
        au FileType helpfile nnoremap     " Enter selects subject
        au FileType helpfile nnoremap     " Backspace to go back
        
        " When using mutt, text width=72
        au FileType mail,tex set textwidth=72
        au FileType cpp,c,java,sh,pl,php,asp  set autoindent
        au FileType cpp,c,java,sh,pl,php,asp  set smartindent
        au FileType cpp,c,java,sh,pl,php,asp  set cindent
        "au BufRead mutt*[0-9] set tw=72
        
        " Automatically chmod +x Shell and Perl scripts
        "au BufWritePost   *.sh             !chmod +x %
        "au BufWritePost   *.pl             !chmod +x %
    
        " File formats
        au BufNewFile,BufRead  *.pls    set syntax=dosini
        au BufNewFile,BufRead  modprobe.conf    set syntax=modconf
    endif
    
    " Keyboard mappings
    map  :previous  " map F1 to open previous buffer
    map  :next      " map F2 to open next buffer
    map   :silent noh " turn off highlighted search
    map ,v :sp ~/.vimrc " edit my .vimrc file in a split
    map ,e :e ~/.vimrc      " edit my .vimrc file
    map ,u :source ~/.vimrc " update the system settings from my vimrc file
    "----- write out html file
    map ,h :source $VIM/vim71/syntax/2html.vim:w:clo
    
    
    " Common command line typos
    "cmap W w
    "cmap Q q
    
    " Keyboard mapping for numeric keypad
    "imap OM 
    " map OM 
    "imap OP 
    " map OP 
    "imap OQ /
    " map OQ /
    "imap OR *
    " map OR *
    "imap OS -
    " map OS -
    
    "imap Ol +
    "imap Om -
    "imap On ,
    "imap Op 0
    "imap Oq 1
    "imap Or 2
    "imap Os 3
    "imap Ot 4
    "imap Ou 5
    "imap Ov 6
    "imap Ow 7
    "imap Ox 8
    "imap Oy 9
    "imap Oz 0
    
    
    
  577. Anonymous said, on May 28, 2011 at 1:22 pm

    Check the bash shell script is being run by root or not

    #!/bin/bash
    # Init
    FILE=”/tmp/out.$$”
    GREP=”/bin/grep”
    #….
    # Make sure only root can run our script
    if [[ $EUID -ne 0 ]]; then
    echo “This script must be run as root” 1>&2
    exit 1
    fi
    # …

  578. Anonymous said, on May 28, 2011 at 1:26 pm

    if(geteuid() != 0)
    {
    // Tell user to run app as root, then exit.
    }

    http://stackoverflow.com/questions/4159910/check-if-user-is-root-in-c

  579. Anonymous said, on May 28, 2011 at 1:48 pm

    How to detect if we have admin rights in both xp/vista
    http://www.codeguru.com/forum/showthread.php?t=492329

  580. Anonymous said, on May 28, 2011 at 2:11 pm

    Get CPU processor information command prompt

    C:\>echo %PROCESSOR_ARCHITECTURE% %PROCESSOR_IDENTIFIER%

  581. Anonymous said, on May 28, 2011 at 2:22 pm

    WMIC : get computer system hardware and software information

    Ex 1: Get the number of processors

    The command for this is given below.

    wmic computersystem get NumberOfProcessors

    Ex 2: Get the RAM size on the computer

    wmic computersystem get TotalPhysicalMemory

    Ex 3: Check if Day light savings is enabled

    wmic computersystem get EnableDaylightSavingsTime

  582. Anonymous said, on May 28, 2011 at 2:35 pm

    http://tgolden.sc.sabren.com/python/wmi.html

    >>> import wmi
    >>> c = wmi.WMI()
    >>> for s in c.Win32_Processor():
    …. print s
    ….

    instance of Win32_Processor
    {
    AddressWidth = 32;
    Architecture = 0;
    Availability = 3;
    Caption = “x86 Family 15 Model 2 Stepping 4″;
    CpuStatus = 1;
    CreationClassName = “Win32_Processor”;
    CurrentClockSpeed = 1794;
    CurrentVoltage = 15;
    DataWidth = 32;
    Description = “x86 Family 15 Model 2 Stepping 4″;
    DeviceID = “CPU0″;
    ExtClock = 100;
    Family = 2;
    L2CacheSize = 0;
    Level = 15;
    LoadPercentage = 7;
    Manufacturer = “GenuineIntel”;
    MaxClockSpeed = 1794;
    Name = ” Intel(R) Pentium(R) 4 CPU 1.80GHz”;
    PowerManagementSupported = FALSE;
    ProcessorId = “3FEBFBFF00000F24″;
    ProcessorType = 3;
    Revision = 516;
    Role = “CPU”;
    SocketDesignation = “Microprocessor”;
    Status = “OK”;
    StatusInfo = 3;
    Stepping = “4″;
    SystemCreationClassName = “Win32_ComputerSystem”;
    SystemName = “LON42″;
    UpgradeMethod = 4;
    Version = “Model 2, Stepping 4″;
    };

  583. Anonymous said, on May 28, 2011 at 4:40 pm

    Examples of WMIC commands for Windows .NET SERVER Family

    4.0 Data output:

    WMIC BIOS > mydata.txt

    WMIC OS >> mydata.txt

    WMIC /APPEND:mydata.txt PAGEFILE

    WMIC /OUTPUT:output.txt OS

    WMIC /OUTPUT:CLIPBOARD BIOS

  584. Anonymous said, on May 28, 2011 at 5:05 pm

    http://www.intel.com/technology/vpro/privacy/index.htm
    UUIDs are present in virtually all modern PCs, and are commonly installed by OEMs on all platforms, without relation to Intel AMT. Indeed, UUIDs are currently utilized by applications found on many PCs to isolate unique system information in order to provide expected functionality, such as the delivery of Operating System or virus control system updates.
    Intel AMT stores information in flash memory on the system motherboard. This information includes firmware code, hardware inventory data (for example, memory size, CPU type, hard-disk type), an event log which records platform events (for example, CPU heating up, Fan Failure, BIOS POST message), Intel AMT security events (for example, a warning of Intel AMT password attack event, or System Defense filter tripping), as well as Intel AMT configuration data (for example, network settings, access control lists, and universal unique identifiers (UUIDs), including provisioning data, LAN MAC address, keys, KVM passwords, TLS certificates, and IT configured wireless network profiles). All configuration data that is deemed sensitive is stored in an encrypted form on the flash. More information regarding UUIDs may be found in the section below.

  585. Anonymous said, on May 28, 2011 at 5:07 pm

    http://www.jdhitsolutions.com/resources/articles/WMIC-Introduction.pdf

    wmic cpu list /format:tvlist
    wmic os list /format:tvlist
    wmic /output:mypc.htm computersystem list /format:hform (open mypc.htm in browser)
    wmic logicaldisk list brief /format:tvlist
    wmic csproduct list /format:tvlist

  586. Anonymous said, on June 2, 2011 at 1:24 pm

    Grub setting
    http://www.geocities.co.jp/sugachan1973/doc/funto71.html

  587. Anonymous said, on June 2, 2011 at 8:06 pm

    CentOS5.4にCUDAをインストール

    https://sites.google.com/site/yukijapanqcd/cuda

    bash NVIDIA-Linux-x86_64-190.53-pkg2.run.sh –kernel-source-path /usr/src/kernels/2.6.18-194.3.1.el5-x86_64 –kernel-name=’2.6.18-1943.1.el5′
    で完了。ちなみにkernel-sourceのパスは/usr/src/kernels/の中を見ておけばよくて、–kernel-nameにはx86_64の前までの数字を入れればいい。コマンドラインから
    uname -r
    としても確認できる。とりあえず大切なのは–kernel-source-pathでちゃんとカーネルソースのパスをオプションで与えてやること。後ろの–kernel-nameは別になくてもうまくいったので必要ないかな?

  588. Anonymous said, on June 3, 2011 at 1:20 am

    # find . \! -name *.gz -type f -print0 | xagrs -null -P 4 -r gzip -9

  589. Anonymous said, on June 3, 2011 at 1:22 am

    CC=’ccache gcc’ make -j4

  590. Anonymous said, on June 4, 2011 at 6:51 pm

    sudo grub-mkconfig -o /mnt/usb/boot/grub/

  591. Anonymous said, on June 4, 2011 at 6:51 pm

    ~# fdisk -l
    ~# mount -l
    ~# umount /dev/sdf*
    ~# fdisk -H 224 -S 56 /dev/sdf
    Command (m for help): p
    Command (m for help): o
    Command (m for help): p
    Command (m for help): n
    Command action
    e extended
    p primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-624, default 1):
    Using default value 1
    Last cylinder, +cylinders or +size{K,M,G} (1-624, default 624):
    Using default value 624
    Command (m for help): x
    Expert command (m for help): b
    Partition number (1-4): 1
    New beginning of data (56-7827455, default 56): 256
    Expert command (m for help): r
    Command (m for help): p
    Command (m for help): u
    Command (m for help): p
    Command (m for help): a
    Partition number (1-4): 1
    Command (m for help): w
    ~# mke2fs -t ext2 -E stripe-width=32,resize=165G /dev/sdf1
    ~# tune2fs -c 0 -i 0 /dev/sdf1

  592. Anonymous said, on June 4, 2011 at 8:01 pm

    Command-line Approach (see below for GUI approach)

    Ubuntu 10.10 uses Grub 2 and with Grub 2, to change the default boot order you no longer edit grub.conf or menu.lst files located in /boot/grub folder. The file to be edited is now “grub” located in /etc/default/ folder, you can edit it by running the following command from terminal

    sudo gedit /etc/default/grub
    http://www.hackourlife.com/change-default-boot-order-for-grub-in-ubuntu-10-10-maverick-meerkat/

  593. Anonymous said, on June 4, 2011 at 8:16 pm

    Grub2 USB Install From Ubuntu Live CD Essentials:

    * Ubuntu 9.10/10.04/10.10 Live CD –
    * A PC that can boot from USB/CD
    * 1GB or larger USB Flash Drive
    * No Fear of the Terminal

    Grub2 USB Flash Drive Install using the Ubuntu Live CD:

    1. Boot from your Live Ubuntu Linux CD
    2. Once booted, insert your USB Flash Drive
    3. Open a terminal and type sudo su
    4. Type fdisk -l (and note which device is your USB)
    5. Type mkdir /mnt/USB && mount /dev/sdx1 /mnt/USB (replacing x with your actual usb device)
    6. Type grub-install –force –no-floppy –root-directory=/mnt/USB /dev/sdx (replacing x with your actual USB device)
    7. Type cd /mnt/USB/boot/grub
    8. Type wget pendrivelinux.com/downloads/grub.cfg
    9. Type df (and locate where cdrom is mounted I.E./dev/sr0)
    10. Type dd if=/dev/sr0 of=/mnt/USB/ubuntu.iso (replacing sr0 with the device found in step 9)
    11. Remove your Live CD and reboot your PC, setting your BIOS or Boot Menu to boot from the USB device.

    If all goes well, you should now be booting into your Grub2 prepared USB Flash Drive, with a Grub2 Boot Menu option to Boot from the Ubuntu ISO you copied to your USB in step 10.

  594. Anonymous said, on June 8, 2011 at 1:06 am

    The Grub 2 Guide
    (formerly Grub 2 Basics)
    http://ubuntuforums.org/showthread.php?t=1195275

  595. Anonymous said, on June 11, 2011 at 11:32 pm

    #yum install texlive-latex texlive-east-asian xdvik dvipdfmx
    #rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
    #rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
    #yum install nspluginwrapper.i686 AdobeReader_jpn

    http://www.if-not-true-then-false.com/2010/install-adobe-acrobat-pdf-reader-on-fedora-centos-red-hat-rhel/

  596. Anonymous said, on June 12, 2011 at 12:46 pm

    Fedora 13 comes with open source NOUVEAU driver for NVidia graphics card. To install the NVidia propriteray driver follow the below steps.

    1) Blacklist the nouveau driver: Add below line to /etc/modprobe.d/blacklist.conf file
    blacklist nouveau
    2) Rebuild the initramfs image file using dracut:
    * Backup the initramfs file
    $ sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
    * Rebuild the initramfs file
    $ sudo dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
    3) Reboot the system to runlevel 3 (without graphics)
    4) Check that nouveau driver is not loaded
    $ lsmod | grep nouveau
    5) Run the NVidia driver package
    $ sudo ./NVIDIA-Linux-x86_64-195.36.15-pkg2.run
    Above command will create xorg.conf file in /etc/X11 directory which is responsible to use NVidia driver in X.
    6) Restart the system and NVidia driver will be used now.

  597. Anonymous said, on June 22, 2011 at 8:24 pm

    cuda 40 GPU direct
    http://handasse.blogspot.com/2011/06/cuda-40gpu.html

  598. Anonymous said, on June 22, 2011 at 8:51 pm

    # CUDA
    export PATH=/usr/local/cuda/bin:$PATH
    export CPLUS_INCLUDE_PATH=”/Developer/GPU Computing/C/common/inc”:/usr/local/cuda/include:$CPLUS_INCLUDE_PATH
    export C_INCLUDE_PATH=”/Developer/GPU Computing/C/common/inc”:/usr/local/cuda/include:$C_INCLUDE_PATH
    export LIBRARY_PATH=”/Developer/GPU Computing/C/common/lib”:”/Developer/GPU Computing/C/lib”:/usr/local/lib:$LIBRARY_PATH
    export DYLD_LIBRARY_PATH=/usr/local/cuda/lib

    http://d.hatena.ne.jp/Levi/20090921/1253535802

  599. Anonymous said, on June 25, 2011 at 5:55 pm

    ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so

    export CUDA_HOME=”/usr/local/cuda”
    export LD_LIBRARY_PATH=”${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64″
    export PATH=${CUDA_HOME}/bin:${PATH}

  600. Anonymous said, on June 25, 2011 at 9:29 pm

    How to setup x86_64 plugins for Firefox on Centos 5

    http://wiki.centos.org/TipsAndTricks/PluginsFor64BitFirefox

  601. Anonymous said, on June 25, 2011 at 11:26 pm

    Install plugins for Firefox in Linux x86-64

    cd /home/USERNAME/.mozilla/pugins
    wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz
    tar xvzf flashplayer10_2_p3_64bit_linux_111710.tar.gz
    chown USERNAME.USERNAME libflashplayer.so.

  602. Anonymous said, on June 26, 2011 at 1:21 pm

    既存のVSプロジェクトにCUDAコードを追加する方法

    CUDA_PATH=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\
    CUDA_PATH_V4_0=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\

    CUDA_BIN_PATH=%CUDA_PATH%\bin
    CUDA_INC_PATH=%CUDA_PATH%\include
    CUDA_LIB_PATH=%CUDA_PATH%\lib\Win32

  603. Anonymous said, on June 26, 2011 at 1:35 pm

    CUDA 4.0 now ships as five components:

    Developer driver
    CUDA Toolkit
    CUDA Tools SDK
    GPU Computing SDK
    Parallel Nsight

    CUDA Tools SDK is a new entrant. In CUDA 4.0, this only includes an API named CUDA Profiler Tools Interface (CUPTI), which is aimed at folks writing CUDA tools.

    Thrust 1.4.0 is included along with the CUDA Toolkit and so are the latest Build Rules.
    Support for Visual Studio 2010 still seems spotty

    Installing CUDA Toolkit adds these environment variables:

    CUDA_PATH,
    CUDA_PATH_V4_0
    CUDA_BIN_PATH
    CUDA_INC_PATH
    CUDA_LIB_PATH

  604. Anonymous said, on June 26, 2011 at 1:39 pm

    CUDA_BIN_PATH=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\bin

    CUDA_INC_PATH=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\include

    CUDA_LIB_PATH=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\lib\Win32

    CUDA_PATH=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\

    CUDA_PATH_V3_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\

    CUDA_PATH_V4_0=C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.0\

  605. Anonymous said, on June 26, 2011 at 1:41 pm

    The long awaited CUDA 4.0 release is finally here! For developers, CUDA now ships as five components:

    Developer driver
    CUDA Toolkit
    CUDA Tools SDK
    GPU Computing SDK
    Parallel Nsight

    The confusingly named CUDA Tools SDK is a new entrant. In CUDA 4.0, this only includes an API named CUDA Profiler Tools Interface (CUPTI), which is aimed at folks writing CUDA tools.

    Thrust 1.4.0 is included along with the CUDA Toolkit and so are the latest Build Rules. Support for Visual Studio 2010 still seems spotty

    Installing CUDA Toolkit adds these environment variables:

    CUDA_PATH
    CUDA_PATH_V4_0
    CUDA_BIN_PATH
    CUDA_INC_PATH
    CUDA_LIB_PATH

  606. Anonymous said, on June 26, 2011 at 1:45 pm

    x64版CUDA上で32bitアプリケーションのビルド

    x64版のWindows OS上に32bit版のCUDAツールキット,SDKをインストールして, 32bitアプリケーションをコンパイルすることは可能.しかし,64bit版のCUDAには32bit用のlib,dllも含まれているので, 64bit版CUDAツールキット,SDKをインストールしても32bitアプリケーションをビルドすることは可能である.ただし,プロジェクトに以下の設定を行う必要がある(Visual Studioの場合).

    追加のライブラリディレクトリに $(CUDA_LIB_PATH)/../lib を設定
    CUDA Build Rule の Extra Optionsに -m32 を設定
    32ビット用のdllをC:\CUDA\bin\などから実行フォルダにコピー(例:cudart32_30_14.dll cublas32_30_14.dll cufft32_30_14.dll) (PATHに”C:\CUDA\bin\”を追加でも良いかも)

  607. Anonymous said, on June 27, 2011 at 6:43 pm

    openssl + windows

    http://www.devside.net/guides/windows/openssl

  608. Anonymous said, on June 27, 2011 at 11:57 pm

    Native windows x64 software develop with Mingw-w64

    http://www.drangon.org/mingw/

  609. Anonymous said, on June 28, 2011 at 2:44 am

    Compile for Windows on Linux
    http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/

  610. Anonymous said, on July 1, 2011 at 3:19 am

    You can also use MSYS+mingw-w64:

    1) download and extract msys to C:\msys
    2) download and extract mingw-w64 to c:\mingw64
    3) run msys postinstall script. When it asks for your mingw installation, point it to C:\mingw64\bin
    4) Extract an openssl daily snapshot (1.0.0 release has a bug). In the source dir run configure mingw64
    make
    make check
    make install
    5) openssl is installed to /local/

  611. Anonymous said, on July 2, 2011 at 11:46 pm

    openssl mingw
    http://members.jcom.home.ne.jp/jacobi/linux/diary2011.html

  612. Anonymous said, on July 3, 2011 at 2:43 am

    Install git yasm

    [paraches@localhost myTest]$ sudo vi /etc/yum.repos.d/rpmforge.repo
    [paraches@localhost myTest]$ cat /etc/yum.repos.d/rpmforge.repo
    [rpmforge]
    name = Red Hat Enterprise $releasever – RPMforge.net – dag
    mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
    enabled = 0
    gpgcheck = 0

    [paraches@localhost myTest]$ sudo yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: rsync.atworks.co.jp
    * extras: rsync.atworks.co.jp
    * updates: rsync.atworks.co.jp
    Setting up Update Process
    No Packages marked for Update
    [paraches@localhost myTest]$

    [paraches@localhost myTest]$ sudo yum install git yasm –enablerepo=rpmforge

  613. Anonymous said, on July 3, 2011 at 2:44 am

    MinGWでx264、ffmpegをビルド

    http://suusiki.wordpress.com/2009/01/24/test2/#comment-783

  614. Anonymous said, on July 3, 2011 at 2:57 am

    yum install gcc-c++

  615. Anonymous said, on July 3, 2011 at 1:30 pm

    build mingw w64
    http://www.zeranoe.com/scripts/mingw_w64_build/

  616. Anonymous said, on July 4, 2011 at 8:04 am

    To support C/C++ 32 bit development libraries on CentOS-5.2 x86_64 arch the below devel packages are required:

    yum install glibc-devel.i386 libstdc++-devel.i386

    Below is example output of multilib support for gcc:

    $ gcc -print-multi-lib; gcc -print-multi-os-directory; gcc -print-multi-os-directory -m32

  617. Anonymous said, on July 4, 2011 at 7:48 pm

    What version of MinGW-w64 would you like to build or update?
    1. Both Win32 and Win64
    2. Win32 (32-bit only)
    3. Win64 (64-bit only)
    4. About
    5. Exit
    Input your choice [1-5]:

    Would you like to manually choose which package versions to build into MinGW-w64 yourself? [y/n]:

  618. Anonymous said, on July 6, 2011 at 3:43 pm

    Install kernal
    http://blog.htlab.net/2011/06/08/centos_kernel/

  619. Anonymous said, on August 13, 2011 at 1:13 pm

    Cross-Platform Way of Obtaining MAC Address of Your Machine

    http://www.gidforums.com/t-9531.html

    How to get mac address for an interface in linux using a C Program

    Getting MAC Address with C++ (Linux)

    Simple sample of getting MAC address information

    http://www.raspberryginger.com/jbailey/minix/html/ifconfig_8c-source.html

  620. Anonymous said, on August 13, 2011 at 1:15 pm

    Cross-Platform Way of Obtaining MAC Address of Your Machine

  621. Anonymous said, on August 13, 2011 at 1:15 pm

    Simple sample of getting MAC address information

  622. Anonymous said, on August 13, 2011 at 1:16 pm

    Unique Way To Indentify PC

  623. Anonymous said, on August 13, 2011 at 1:16 pm

    How to get mac address for an interface in linux using a C Program

  624. Anonymous said, on August 13, 2011 at 9:33 pm

    Install Adobe (Acrobat PDF) Reader on Fedora 15/14, CentOS/Red Hat (RHEL) 5.6/6

  625. Anonymous said, on August 15, 2011 at 1:18 am

    install centos
    http://www.kkaneko.com/rinkou/linux/centosinstall.html

  626. Anonymous said, on August 15, 2011 at 7:39 am

    Stopping automatic updates on centos

    chkconfig yum-updatesd off
    service yum-updatesd stop

  627. Anonymous said, on August 18, 2011 at 1:09 am

    centos 5.6
    bash devdriver_4.0_linux_64_270.41.19.run –kernel-source-path /usr/src/kernels/2.6.18-238.19.1.el5-x86_64

  628. Anonymous said, on August 18, 2011 at 1:13 am

    Install Adobe (Acrobat PDF) Reader on Fedora 15/14, CentOS/Red Hat (RHEL) 5.6/6

    rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
    rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
    yum install nspluginwrapper.i686 AdobeReader_enu

  629. Anonymous said, on August 18, 2011 at 1:33 am

    M+フォントとIPAフォントの合成およびデフォルト化

  630. Anonymous said, on August 18, 2011 at 10:22 am

    #Change directory color to red
    .dir_colors
    DIR 01;31 # directory to red

  631. gnuplot said, on August 27, 2011 at 2:18 pm
    
    set term postscript enhanced color solid 10 "Helvetica" 15
     
    set style line 1 lt 1 lw 3
    set style line 2 lt 2 lw 3
    set style line 3 lt 3 lw 3
    set style line 4 lt 4 lw 3
    set style line 5 lt 5 lw 3
    set style line 6 lt 8 lw 3
    
    set style line 7 lt 7 lw 1
    set style line 8 lt 7 lw 1 #10
    set style line 9 lt 7 lw 1 #10
    
    set pointsize 2
    
    unset log  
    unset label 
    
    set xtic auto
    set ytic auto
    #set mxtics 1
    #set mytics 10
    set grid
    
    
    #set xdata time
    set output "graph.png"
    set xrange [0:3000]
    set yrange [0:30]
    set grid
    set xlabel "loop"
    set ylabel "Time (ms)"
    set title ""
    set key right box
    
    f(x)=40
    
    set output "test.ps"
    plot f(x) title "40 ms", "dat.txt" using 1 title "Tile" with lines ls 1
    
    
  632. Anonymous said, on August 27, 2011 at 2:21 pm

    gnuplot plot.plt
    convert -density 1000×1000 -rotate 90 -resize 1024×768 test.ps test.png
    display test.png&

  633. Anonymous said, on August 27, 2011 at 3:13 pm

    visudo(/usr/sbin/visudo)を使い、sudo できるユーザを /etc/sudoersに記述します

    aaa ALL=(ALL) ALL

  634. Anonymous said, on August 27, 2011 at 4:46 pm

    sudo yum install freeglut freeglut-devel

  635. Anonymous said, on August 28, 2011 at 2:35 am

    The extended ioctl() requests for sockets (SIOC*) in libport doesn’t
    include SIOCGIFHWADDR. However, you will notice the naming convention of
    the NIC’s. The name is generated uniquely by Windows OS when the machine
    detects the hardware. If the NIC is moved, for example, from slot 1 to
    slot 2 on the board, a new name is generated for it. It’s yet another
    uniquely generated name. If you move the NIC back to the original slot
    then the original name will be used. Reboot to reboot the name will
    remain the same as long as the hardware is in the same location. So I
    think you can safely use the name returned by SIOCGIFCONF for the same
    purpose that you are using SIOCGIFHWADDR.

    You want to install the most current version of libport which is
    version 1.1.5 which is currently sitting in the beta directory, but will
    go live later today. The 1.0 version, as discussed in the thread you mention,
    noted that 1.0 had the debug names coming out.

  636. Anonymous said, on August 28, 2011 at 1:50 pm

    CPUID is another choice for those architectures supporting it. A concatenation of MAC (when there is an Ethernet device present!) and CPUID will usually work as a fairly unique identifier.

  637. Anonymous said, on August 28, 2011 at 5:20 pm

    cpuid sample program

  638. Anonymous said, on August 30, 2011 at 1:49 am
    
    #reset
    # Produce some dummy data
    #set sample 200
    #set table 'stats2.dat'
    #plot [0:10] 0.5+rand(0)
    #unset table
    
    set xrange [1:3000]
    set yrange [1.94:2.0]
    unset key
    
    # Retrieve statistical properties
    plot 'stats2.dat' u 2
    min_y = GPVAL_DATA_Y_MIN
    max_y = GPVAL_DATA_Y_MAX
    
    f(x) = mean_y
    fit f(x) 'stats2.dat' u ($2/$2):($2-$1) via mean_y
    
    stddev_y = sqrt(FIT_WSSR / (FIT_NDF + 1 ))
    
    
    set terminal postscript eps enhanced color  "Helvetica" 
    set output "test.eps"
    set pointsize 2.5
    # Plotting the minimum and maximum ranges with a shaded background
    #set label 1 gprintf("Mean = %g", mean_y) at 2, min_y-0.2
    #ZZset label 2 gprintf("Standard deviation = %g", stddev_y) at 2, min_y-0.35
    #plot mean_y-stddev_y with filledcurves y1=mean_y lt 1 lc rgb "#bbbbdd", \
    #mean_y+stddev_y with filledcurves y1=mean_y lt 1 lc rgb "#bbbbdd", \
    #mean_y w l lt 3, 'stats2.dat' u 2 with linespoints lt 3 pt 4
    
    
    plot mean_y w l lt 1 lw 3, 'stats2.dat' u ($2-$1) w l lt 3 
    
    #plot 'stats2.dat' u 2:2 w l
    
    
  639. Anonymous said, on September 4, 2011 at 2:11 pm

    pid=`/sbin/pidof $1`
    echo “PID of $1 is: $pid”
    taskset -c -p $2 “$pid”
    taskset -c -p “$pid”

  640. Anonymous said, on September 4, 2011 at 2:12 pm

    set_aff appName CPUID

  641. Anonymous said, on September 4, 2011 at 2:17 pm

    pid=`/sbin/pidof $1`
    echo “PID of $1 is: $pid”
    taskset -c -p $2 $pid
    taskset -c -p $pid

  642. Anonymous said, on September 4, 2011 at 2:21 pm

    set_af.sh firefox 1

  643. Anonymous said, on September 4, 2011 at 3:45 pm

    f you run Terminal.app with a black background and a color ‘ls’ command, directories (in bold blue) can be hard to see. You can change the color of directories with an export LS_COLORS command. For example, to make all directories yellow, add this to “.bash_profile” in your home directory:

    export LS_COLORS=’di=01;33′

    or for red color
    export LS_COLORS=’di=01;31′

  644. Anonymous said, on September 4, 2011 at 4:34 pm

    [cent@dlp ~]$
    vi ~/.bash_profile
    # 最終行に追記

    LANG=ja_JP.UTF-8
    export LANG
    [cent@dlp ~]$
    source ~/.bash_profile

    [cent@dlp ~]$
    echo $LANG

    ja_JP.UTF-8
    # 変更された

  645. Anonymous said, on September 4, 2011 at 4:35 pm

    [cent@dlp ~]$
    vi ~/.bash_profile
    # 最終行に追記

    LANG=ja_JP.UTF-8
    export LANG
    [cent@dlp ~]$
    source ~/.bash_profile

  646. Anonymous said, on September 4, 2011 at 4:36 pm

    LANG=ja_JP.UTF-8
    export LANG

  647. Anonymous said, on September 4, 2011 at 5:04 pm

    PATH=/usr/local/teTex/bin:$PATH; export PATH

  648. backup said, on September 11, 2011 at 12:39 am
    
    #!/bin/sh
    
    ## Copyright (c) 2010-2011, Michael D. Adams
    ## 
    ## 
    ## Permission to use, copy, modify, and/or distribute this software for any
    ## purpose with or without fee is hereby granted, provided that the above
    ## copyright notice and this permission notice appear in all copies.
    ## 
    ## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    ## WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    ## MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ## ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    ## OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    
    set -u # Variables that are not set are errors
    set -x # Print commands when executed
    
    HOST=user@host.com
    SRC=/path/to/src # no slash at end
    DST=/path/to/dst # no slash at end
    
    # If backup.0 already exists then bump age numbers and remove old backup.3
    if ssh "$HOST" test -d "$DST"/backup.0; then
        ssh "$HOST" rm -rf "$DST"/backup.3
        ssh "$HOST" mv "$DST"/backup.2 "$DST"/backup.3
        ssh "$HOST" mv "$DST"/backup.1 "$DST"/backup.2
        ssh "$HOST" mv "$DST"/backup.0 "$DST"/backup.1
    fi
    
    # --progress: so we know if the program froze
    # --archive:
    #     recursive, links, permissions, times, group, owner, devices, specials
    # --delete: remove no longer existant files in old backup.pre.
    #     We don't delete the entire old backup.pre so we can do a fast restart.
    # -F: use per-directory ".rync-filter" files to filter
    # --rsh: tunnel over SSH
    # --link-dest: share hard links to unchanged files with previous backup
    rsync --progress --archive --delete -F --rsh=ssh --link-dest=../backup.1 \
      "$SRC" "$HOST":"$DST"/backup.pre &amp;&amp;
    ssh "$HOST" mv "$DST"/backup.pre "$DST"/backup.0
    
    
  649. Anonymous said, on September 11, 2011 at 5:06 pm

    fit-pc2i

    * Wake-on-LAN works in S3 (standby), but does not work in S5 (off state). The reason is that WOL is implemented as PCI wake to the US15W SCH which is not powered in S5.
    * For controlling fit-PC2i remotely use standby rather than shut down. To restart from a clean boot use software reboot.

  650. Anonymous said, on September 11, 2011 at 5:17 pm

    To Hibernate/Suspend Linux

    Much easier, without any package:
    echo -n mem > /sys/power/state (Suspend, to RAM)
    echo -n disk > /sys/power/state (Hibernate, to disk)

  651. Anonymous said, on September 11, 2011 at 5:46 pm

    get macaddress from IP address

    arp -a IP-address

  652. Anonymous said, on September 11, 2011 at 8:56 pm

    ACPIは異なったスリープ状態を定義します。最も重要な物は

    * スタンバイとして知られるS1
    * RAMをサスペンドするS3
    * ディスクをサスペンドするS4

    これらはシステムが使用中ではない場合にはいつも呼び出されますが、シャットダウンは起動に長い時間がかかるので望ましくありません。

  653. Anonymous said, on September 13, 2011 at 11:51 pm

    mingw curl

    https://launchpad.net/~flosoft/+archive/cross-mingw/+packages

  654. Anonymous said, on September 16, 2011 at 1:45 am

    Using LIBCurl with C++ Simple OOP Static Class ExampleUsando LIBCurl en C++ Ejemplo de OOP

  655. Anonymous said, on September 16, 2011 at 1:50 am

    /*
    struct tm date;
    memset(&date,0,sizeof(date));
    date.tm_year = 2000 – 1900;
    date.tm_mon = 12 – 1;
    date.tm_mday = 1;
    date.tm_hour = 1;
    date.tm_min = 0;
    date.tm_sec = 0;
    date.tm_isdst = -1; // VERY IMPORTANT
    mktime(&date); /// fill rest of fields
    printf(“distance from UCT %d\n”,date.tm_gmtoff);
    */

  656. Anonymous said, on September 17, 2011 at 2:59 pm

    export PATH=$PATH:/sbin:/usr/sbin
    http://sourceforge.net/projects/bootinfoscript/
    fsdisk -l

  657. Anonymous said, on September 17, 2011 at 8:38 pm

    yum groupinstall “X Window System”
    yum groupinstall “Development Tools”
    yum groupinstall “Additional Development”

  658. Anonymous said, on September 17, 2011 at 8:39 pm

    yum groupinstall “Development Tools”
    yum groupinstall “Additional Development”

  659. Anonymous said, on September 17, 2011 at 8:44 pm

    CentOS 5.5の場合

    yum groupinstall “Development Tools”
    yum groupinstall “Development Libraries”

  660. Anonymous said, on September 17, 2011 at 8:53 pm

    ・CentOS等のRedHat系ディストリでは
    /etc/sysconfig/network-scripts/ifcfg-ethX
    (※Xは設定するデバイス)

    ・UbuntuなどDebian系ディストリで

    /etc/network/interfaces

    ETHTOOL_OPTS=”wol g”

    を追加して、デバイスを再起動すればOK
    Ubuntuは試していないが、CentOSでは問題なくWakeOnLANしてくれました

  661. Anonymous said, on September 17, 2011 at 9:00 pm

    wakelan -b 192.168.0.255 -m xxxxxxxxxx

  662. Anonymous said, on September 19, 2011 at 2:41 am

    CS001115 – Reading and writing binary files in Open C++

  663. Anonymous said, on September 19, 2011 at 2:43 am

    Reading and writing binary files in Open C++

  664. Anonymous said, on September 19, 2011 at 2:45 am

    Reading and writing
    binary files in Open C++

  665. Anonymous said, on September 23, 2011 at 11:43 am

    * All public variables must begin with m like mFooVar. The m stands for member.
    * All protected variables must begin with mt, like mtFooVar and methods with t, like tFooNum(). The t stands for protected.
    * All private variables must begin with mv, like mvFooVar and methods with v, like vFooLone(). The v stands for private.
    * All public, protected and private variables must begin with uppercase after m like F in mFooVar.
    * All pointer variables must be prefixed with p, like
    o Public variables mpFooVar and methods like FooNum()
    o Protected variables mtpFooVar and methods with t like tFooNum()
    o Private variables mvpFooVar and methods with v like vFooNum()

    Uniform world-wide coding convention for C++ language will help better programming.

    In the sample code given below t stands for protected, v stands for private, m stands for member-variable and p stands for pointer.

  666. Different mechanisms for passing arguments said, on September 23, 2011 at 1:06 pm
    
    // a. A copy of the argument is created on the stack.
    //    The copy constructor is called on entry, 
    //    and the destructor is called at exit from the function.
    //    This may lead to very inefficient code.
    
    void foo1( String s );
    String a;
    fool( a )      // call-by-value
    
    // b. The actual argument is used by the function 
    //    and it can be modified by the function.
    
    void foo2( String&amp; s );
    String b;
    foo2( b )     // call-by-reference
    
    // c. The actual argument is used by the function 
    //    but it cannot be modified by the function.
    
    void foo3( const String&amp; s ) ;
    String c;
    foo3( c )     // call-by-constant-reference
    
    // d. A pointer to the actual argument is used by the function.
    //    May lead to messy syntax when the function uses the argument.
    
    void foo4( const String* s );
    String d;
    foo4( &amp;d )      // call-by-constant-pointer
    
    
  667. References instead of pointers said, on September 23, 2011 at 1:38 pm
    
    // Unnecessarily complicated use of pointers
    void addOneComplicated( int* integerPointer )
    {
       *integerPointer += 1;
    }
    
    addOneComplicated ( &amp;j );
    
    // Write this way instead:
    void addOneEasy( int&amp; integerReference )
    {
       integerReference += 1;
    }
    
    
  668. Anonymous said, on September 23, 2011 at 2:44 pm

    [27.5] Should I use using namespace std in my code?

    Probably not.

    People don’t like typing std:: over and over, and they discover that using namespace std lets the compiler see any std name, even if unqualified. The fly in that ointment is that it lets the compiler see any std name, even the ones you didn’t think about. In other words, it can create name conflicts and ambiguities.

    For example, suppose your code is counting things and you happen to use a variable or function named count. But the std library also uses the name count (it’s one of the std algorithms), which could cause ambiguities.

    Look, the whole point of namespaces is to prevent namespace collisions between two independently developed piles of code. The using-directive (that’s the technical name for using namespace XYZ) effectively dumps one namespace into another, which can subvert that goal. The using-directive exists for legacy C++ code and to ease the transition to namespaces, but you probably shouldn’t use it on a regular basis, at least not in your new C++ code.

  669. Anonymous said, on September 23, 2011 at 3:58 pm
    
    using std::ostream;
    using std::ofstream;
    using std::ifstream;
    using std::ios;
    using std::stringstream;
    using std::string;
    using std::cerr;
    using std::cout;
    using std::endl;
    using std::setfill;
    using std::setw;
    using std::vector;
    
    
  670. Anonymous said, on September 30, 2011 at 12:18 am

    To install htop, first install ncurses-devel
    yum install ncurses-devel

  671. Anonymous said, on September 30, 2011 at 12:28 am

    * 「Ctrl – t」+「S」 *1で画面分割 (Sは大文字)
    * 「Ctrl – t」+「Tab」で画面移動
    * 「Ctrl – t」+「X」 で分割した画面をkill(結合) (Xは大文字)

  672. Anonymous said, on September 30, 2011 at 1:31 am

    Tmux

    change ctr b to ctr t:

    .tmux.conf

    unbind C-b
    set -g prefix C-t

  673. Anonymous said, on September 30, 2011 at 1:31 am

    unbind C-b
    set -g prefix C-t

  674. Anonymous said, on September 30, 2011 at 8:44 am

    TMUX – The Terminal Multiplexer (Part 2)
    http://paraschopra.com/tutorials/particle-systems/

  675. Anonymous said, on October 1, 2011 at 5:28 pm

    tmux上のvimで256表示できません。.bashrcなどで、以下のように環境変数を設定する必要があります。

    export TERM=xterm-256color

  676. Anonymous said, on October 1, 2011 at 5:29 pm
    
    
    
    set-option -g default-terminal screen-256color
    
    set -g prefix C-t
    unbind C-b
    bind C-t send-prefix
    
    # vi key binding in status line is awkward. Do not use it.
    # set -g status-keys vi
    setw -g mode-keys vi
    
    # Detach
    bind C-d detach
    
    # Session
    bind S list-session
    
    # Window
    bind t last-window
    
    # Splitting window
    bind v split-window -h
    bind s split-window -v
    
    # Pane
    bind j select-pane -D
    bind k select-pane -U
    bind h select-pane -L
    bind l select-pane -R
    bind C-j select-pane -D
    bind C-k select-pane -U
    bind C-h select-pane -L
    bind C-l select-pane -R
    
    # Resizing  pane
    bind + resize-pane -D 1
    bind - resize-pane -U 1
    bind  resize-pane -R 1
    
    # Status line settings
    
    set -g status-bg black
    set -g status-fg white
    
    set -g status-right-length 80
    
    # Date style
    set -g status-right '"#T" %H:%M %b.%d,%Y'
    
    # Hightlight active window
    set-window-option -g window-status-current-bg green
    set-window-option -g window-status-current-fg black
    
    
  677. Anonymous said, on October 3, 2011 at 11:10 pm

    export TERM=xterm-256color

  678. Anonymous said, on October 3, 2011 at 11:12 pm

    256 colors in vim

  679. Anonymous said, on October 18, 2011 at 10:43 pm

    CURAND host API example

  680. Anonymous said, on October 19, 2011 at 10:44 pm

    Boost.Program_options
    http://d.hatena.ne.jp/kanetai/20110426/1303824450

  681. Anonymous said, on October 20, 2011 at 3:56 pm
    # Automated Makefile
    CC = g++
    CFLAGS = -Wall -O2
    COMPILE = $(CC) $(CFLAGS) -c
    OBJFILES := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
    all: myprog
    myprog: $(OBJFILES)
    	$(CC) -o myprog $(OBJFILES)
    
    %.o: %.cpp
    	$(COMPILE) -o $@ $&lt;
    
  682. Anonymous said, on October 21, 2011 at 12:16 am
    #Install boost
    tar xvfj boost_1_47_0.tar.bz2
    cd boost_1_47_0
    ./bootstrap.sh --prefix=/usr/local
    ./b2
    /bin/su -c './b2 install'
    
  683. Anonymous said, on October 21, 2011 at 11:22 am

    This Makefile will compile any .cpp file in the current directory. The first change you see from the previous example is the OBJFILES variable. This variable is filled with .o targets using the wildcard command and patsubst. The $(wildcard *.cpp) will retrieve any .cpp file in the current directory and store it in a variable. The patsubstr functions is used to convert a file from one format to another. In this case each .cpp file is converted into a .o extension and then stored into OBJFILES. This variable is then used to compile each .cpp file.
    Instead of having main.o: main.cpp we now have %.o: %.cpp. Any target that has a .o extension will goto here. In the compile line you will see two new variables $@ and $<. $@ will match the target and the $< will match the dependency, so basically $@ will be replace with main.o and $< will be replaced with main.cpp.

  684. Anonymous said, on November 3, 2011 at 12:11 am

    The constant c is the wave speed, CFL condition says that a wave cannot cross more than one grid cell in one time step.

  685. Anonymous said, on November 12, 2011 at 12:00 pm

    1. Always use scope-bound resource management (that’s what C++ is about, after all!)

    A few non-obvious consequences from that rule:

    a. Never “declare variables” only to overwrite them later.
    b. Avoid default constructors and never ever write “setters” or “init” functions for any classes.
    c. Avoid using new as much as possible (use container classes)
    d. Never use delete (all dynamic objects must be handled by smart pointers that match their ownership models)
    e. Never use naked pointers (use auto_ptr/scoped_ptr/unique_ptr, shared_ptr, or what else is appropriate)
    f. Never use C arrays (use containers)

    2. Trust the compiler.

    All 21st century compilers implement required optimizations and lots more that is not required. A few things off the top of my head:
    a. If a function creates a new object, return it by value, never by reference.
    b. Use library functions instead of implementing your own.
    c. Use const whenever possible.

    3. Use the boost libraries (from http://www.boost.org)

    Every serious C++ project today uses them.

  686. Anonymous said, on November 19, 2011 at 8:48 pm

    http://www.cs.lmu.edu/~ray/notes/openglexamples/

    OpenGL Examples

  687. Simple geometry viewer said, on November 19, 2011 at 11:05 pm
    
    /* Simple geometry viewer:  Left mouse: rotate;  Middle mouse:  zoom;  Right mouse:   menu;  ESC to quit
     The function InitGeometry() initializes  the geometry that will be displayed. */
    #include <assert.h>
    #include <math.h>
    #include <stdlib.h>
    #include <GL/glut.h>
    #define MAX_TRIANGLES (10)
    struct Point {float x[3];   float n[3]; };
    struct Triangle {   Point v[3];  };
    Triangle triangleList[MAX_TRIANGLES];
    int triangleCount = 0;
    void InitGeometry();
     
    /* Viewer state */
    float sphi=90.0, stheta=45.0;
    float sdepth = 10;
    float zNear=1.0, zFar=100.0;
    float aspect = 5.0/4.0;
    float xcam = 0, ycam = 0;
    long xsize, ysize;
    int downX, downY;
    bool leftButton = false, middleButton = false;
    int i,j;
    GLfloat light0Position[] = { 0, 1, 0, 1.0};
    int displayMenu, mainMenu;
    enum {WIREFRAME, HIDDENLINE, FLATSHADED, SMOOTHSHADED};
    int displayMode = WIREFRAME;
     
    void MyIdleFunc(void) { glutPostRedisplay();} /* things to do while idle */
    void RunIdleFunc(void) {   glutIdleFunc(MyIdleFunc); }
    void PauseIdleFunc(void) {   glutIdleFunc(NULL); }
     
    void DrawSmoothShaded(void) {
      int i;
      assert( triangleCount < MAX_TRIANGLES );
      glColor3f(0.8f, 0.2f, 0.8f);
      glBegin ( GL_TRIANGLES ) ;
      for ( i = 0; i < triangleCount; ++i ) {
        glNormal3fv( triangleList[i].v[0].n );
        glVertex3fv( triangleList[i].v[0].x );
        glNormal3fv( triangleList[i].v[1].n );
        glVertex3fv( triangleList[i].v[1].x );
        glNormal3fv( triangleList[i].v[2].n );
        glVertex3fv( triangleList[i].v[2].x ); }
      glEnd ( ) ; }
     
    void DrawWireframe(void) {
      int i;
      glColor3f(1.0, 1.0, 1.0);
      for ( i = 0; i < triangleCount; ++i ) {
        glBegin(GL_LINE_STRIP);
        glVertex3fv( triangleList[i].v[0].x );
        glVertex3fv( triangleList[i].v[1].x );
        glVertex3fv( triangleList[i].v[2].x );
        glVertex3fv( triangleList[i].v[0].x );
        glEnd();   } }
     
    void DrawFlatShaded(void) {
      int i;
      glEnable(GL_POLYGON_OFFSET_FILL);
      glColor3f(0.8f, 0.2f, 0.8f);
      glBegin ( GL_TRIANGLES ) ;
      for ( i = 0; i < triangleCount; ++i ) {
        glVertex3fv( triangleList[i].v[0].x );
        glVertex3fv( triangleList[i].v[1].x );
        glVertex3fv( triangleList[i].v[2].x );   }
      glEnd ( ) ;
      glDisable(GL_POLYGON_OFFSET_FILL);}
     
    void DrawHiddenLine(void) {
      glEnable(GL_POLYGON_OFFSET_FILL);
      glColor3f(0,0,0);
      glBegin ( GL_TRIANGLES ) ;
      for ( i = 0; i < triangleCount; ++i ) {
        glVertex3fv( triangleList[i].v[0].x );
        glVertex3fv( triangleList[i].v[1].x );
        glVertex3fv( triangleList[i].v[2].x );   }
      glEnd ( ) ;
      glDisable(GL_POLYGON_OFFSET_FILL);
      glColor3f(1.0,1.0,1.0);
      glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
      glBegin ( GL_TRIANGLES ) ;
      for ( i = 0; i < triangleCount; ++i ) {
        glVertex3fv( triangleList[i].v[0].x );
        glVertex3fv( triangleList[i].v[1].x );
        glVertex3fv( triangleList[i].v[2].x );   }
      glEnd ( ) ;
      glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); }
     
    void ReshapeCallback(int width, int height) {
      xsize = width;
      ysize = height;
      aspect = (float)xsize/(float)ysize;
      glViewport(0, 0, xsize, ysize);
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      glutPostRedisplay();}
     
    void SetDisplayMenu(int value) {
      displayMode = value;
      switch(value) {
        case WIREFRAME: glShadeModel(GL_FLAT); glDisable(GL_LIGHTING); break;
        case HIDDENLINE: glShadeModel(GL_FLAT); glDisable(GL_LIGHTING); break;
        case FLATSHADED: glShadeModel(GL_FLAT); glEnable(GL_LIGHTING); break;
        case SMOOTHSHADED: glShadeModel(GL_SMOOTH); (GL_LIGHTING); break; }
      glutPostRedisplay();}
     
    void SetMainMenu(int value) {switch(value) {case 99: exit(0); break;}}
     
    void DisplayCallback(void) {
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      gluPerspective(64.0, aspect, zNear, zFar);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      glTranslatef(0.0,0.0,-sdepth);
      glRotatef(-stheta, 1.0, 0.0, 0.0);
      glRotatef(sphi, 0.0, 0.0, 1.0);
      switch (displayMode) {
        case WIREFRAME: DrawWireframe();     break;
        case HIDDENLINE: DrawHiddenLine();     break;
        case FLATSHADED: DrawFlatShaded();     break;
        case SMOOTHSHADED: DrawSmoothShaded();     break;   }
      glutSwapBuffers();
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); }
     
    void KeyboardCallback(unsigned char ch, int x, int y) {
      switch (ch) {case 27: exit(0);break; } glutPostRedisplay(); }
     
    void MouseCallback(int button, int state, int x, int y) {
      downX = x; downY = y;
      leftButton = ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN));
      middleButton = ((button == GLUT_MIDDLE_BUTTON) &&  (state == GLUT_DOWN));
      glutPostRedisplay();}
     
    void MotionCallback(int x, int y) {
      if (leftButton){sphi+=(float)(x-downX)/4.0;stheta+=(float)(downY-y)/4.0;} // rotate
      if (middleButton){sdepth += (float)(downY - y) / 10.0;  } // scale
      downX = x;   downY = y;
      glutPostRedisplay();}
     
    void InitGL() {
      glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
      glutInitWindowSize(500, 500);
      glutCreateWindow("cs175 Triangle Viewer");
      glEnable(GL_DEPTH_TEST);
      glDepthFunc(GL_LEQUAL);
      glClearColor(0.0, 0.0, 0.0, 0.0);
      glPolygonOffset(1.0, 1.0);
      glDisable(GL_CULL_FACE);
      glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
      glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
      glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
      glEnable(GL_COLOR_MATERIAL);
      glColorMaterial(GL_FRONT, GL_DIFFUSE);
      glLightfv (GL_LIGHT0, GL_POSITION, light0Position);
      glEnable(GL_LIGHT0);
      glutReshapeFunc(ReshapeCallback);
      glutDisplayFunc(DisplayCallback);
      glutKeyboardFunc(KeyboardCallback);
      glutMouseFunc(MouseCallback);
      glutMotionFunc(MotionCallback); }
     
    void InitMenu() {
      displayMenu = glutCreateMenu(SetDisplayMenu);
      glutAddMenuEntry("Wireframe", WIREFRAME);
      glutAddMenuEntry("Hidden Line", HIDDENLINE);
      glutAddMenuEntry("Flat Shaded", FLATSHADED);
      glutAddMenuEntry("Smooth Shaded", SMOOTHSHADED);
      mainMenu = glutCreateMenu(SetMainMenu);
      glutAddSubMenu("Display", displayMenu);
      glutAddMenuEntry("Exit", 99);
      glutAttachMenu(GLUT_RIGHT_BUTTON); }
     
    void InitGeometry() {
      triangleCount = 2;
      /* coordinates */
      triangleList[0].v[0].x[0] = 0;   triangleList[0].v[0].x[1] = 0;   triangleList[0].v[0].x[2] = 0;
      triangleList[0].v[1].x[0] = 0;   triangleList[0].v[1].x[1] = 1;   triangleList[0].v[1].x[2] = 0;
      triangleList[0].v[2].x[0] = 1;   triangleList[0].v[2].x[1] = 0;   triangleList[0].v[2].x[2] = 0;
      triangleList[1].v[0].x[0] = 0;   triangleList[1].v[0].x[1] = 0;   triangleList[1].v[0].x[2] = 0;
      triangleList[1].v[1].x[0] = 0;   triangleList[1].v[1].x[1] = 0;   triangleList[1].v[1].x[2] = 1;
      triangleList[1].v[2].x[0] = 0;   triangleList[1].v[2].x[1] = 1;   triangleList[1].v[2].x[2] = 0;
      /* normals */
      triangleList[0].v[0].n[0] = 0.7;   triangleList[0].v[0].n[1] = 0;   triangleList[0].v[0].n[2] = 0.7;
      triangleList[0].v[1].n[0] = 0.7;   triangleList[0].v[1].n[1] = 0;   triangleList[0].v[1].n[2] = 0.7;
      triangleList[0].v[2].n[0] = 0;   triangleList[0].v[2].n[1] = 0;   triangleList[0].v[2].n[2] = 1;
      triangleList[1].v[0].n[0] = 0.7;   triangleList[1].v[0].n[1] = 0;   triangleList[1].v[0].n[2] = 0.7;
      triangleList[1].v[1].n[0] = 1;   triangleList[1].v[1].n[1] = 0;   triangleList[1].v[1].n[2] = 0;
      triangleList[1].v[2].n[0] = 0.7;    triangleList[1].v[2].n[1] = 0;   triangleList[1].v[2].n[2] = 0.7; }
     
    void main(int argc, char **argv) {
      glutInit(&argc, argv);
      InitGL();
      InitMenu();
      InitGeometry();
      glutMainLoop(); }
     
    
  688. Anonymous said, on November 21, 2011 at 11:48 am

    Edit /etc/sysconfig/keyboard and
    replace KEYTABLE=”us” by KEYTABLE=”jp106″

  689. Anonymous said, on November 23, 2011 at 1:33 am

    sshでログインしていろいろと操作をする人は、コマンドラインでTABキーを押すとコマンドやファイル名が補完されるのを知っていると思う。

    TABキーでの補完は基本中の基本。コマンドラインはもっと高機能。

    他にもカーソル移動、左右方向への削除、ワード単位の移動&削除、過去のコマンド検索などが可能。

    CTRL-b もしくは ←
    後方(左方)に1文字分移動する
    CTRL-f もしくは →
    前方(右方)に1文字分移動する
    CTRL-h もしくは DEL
    後方(左方)に1文字削除する
    CTRL-d
    前方(右方)に1文字削除する
    CTRL-a
    行の先頭に移動する
    CTRL-e
    行の最後に移動する
    CTRL-k
    行の最後まで削除する
    ESC b
    後方(左方)に1ワード移動する
    ESC f
    前方(右方)に1ワード移動する
    ESC DEL
    後方(左方)に1ワード削除する
    ESC CTRL-h
    後方(左方)に1ワード削除する
    ESC d
    前方(右方)に1ワード削除する
    CTRL-y
    最後に削除されたものを取り出す

    最初は不慣れでも、CTRL+a や CTRL+d など押してみましょう。カーソルが先頭に移動したり、右向きの削除ができたりと、カーソル移動と削除ボタンしか知らなかった方にはちょっと感動の機能です。

    CTRL-r
    過去に実行したコマンドを検索

    これも使い方が分かると、便利すぎてやめられなくなります。

  690. MaryTenderLOS said, on November 27, 2011 at 5:12 pm

    You can get 16 strikers and you can also modify them and later their parts. Most riding toys can be used once a child is able to sit up well while unsupported – but check with the manufacturer’s recommendation. You can use TV to explain confusing situations and express your feelings about difficult topics (sex, love, drugs, alcohol, smoking, work, behavior, family life).

  691. Anonymous said, on November 28, 2011 at 11:01 am

    Ctrl + A Go to the beginning of the line you are currently typing on
    Ctrl + E Go to the end of the line you are currently typing on
    Ctrl + L Clears the Screen, similar to the clear command
    Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
    Ctrl + H Same as backspace
    Ctrl + R Let’s you search through previously used commands
    Ctrl + C Kill whatever you are running
    Ctrl + D Exit the current shell
    Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
    Ctrl + W Delete the word before the cursor
    Ctrl + K Clear the line after the cursor
    Ctrl + T Swap the last two characters before the cursor
    Esc + T Swap the last two words before the cursor
    Alt + F Move cursor forward one word on the current line
    Alt + B Move cursor backward one word on the current line
    Tab Auto-complete files and folder names

  692. Anonymous said, on November 28, 2011 at 11:27 am

    $ set -o emacs

    ctrl-a Move cursor to beginning of line
    ctrl-e Move cursor to end of line
    meta-b Move cursor back one word
    meta-f Move cursor forward one word
    ctrl-w Cut the last word
    ctrl-u Cut everything before the cursor
    ctrl-k Cut everything after the cursor
    ctrl-y Paste the last thing to be cut
    ctrl-_ Undo

    $ set -o vi

    h Move cursor left
    l Move cursor right
    A Move cursor to end of line and put in insert mode
    0 (zero) Move cursor to beginning of line (doesn’t put in insert mode)
    i Put into insert mode at current position
    a Put into insert mode after current position
    dd Delete line (saved for pasting)
    D Delete text after current cursor position (saved for pasting)
    p Paste text that was deleted
    j Move up through history commands
    k Move down through history commands
    u Undo

  693. business directory said, on December 1, 2011 at 4:58 am

    Undeniably believe that which you said. Your favourite reason seemed to be on the net the simplest factor to take note of. I say to you, I definitely get irked while folks think about worries that they just don’t know about. You controlled to hit the nail upon the highest as smartly as defined out the entire thing without having side-effects , people can take a signal. Will probably be back to get more. Thanks

  694. five mistakes said, on December 9, 2011 at 11:51 pm

    Your blog is really interesting to me and your topics are very relevant. I was browsing around and came across something you might find interesting. I was guilty of 3 of them with my sites. “99% of website managers are guilty of these five errors”. http://tinyurl.com/bn4kol9 You will be suprised how easy they are to fix.

  695. Anonymous said, on December 15, 2011 at 11:46 pm

    dvipdfmx -f ipa.map hoge.dvi

  696. Anonymous said, on February 2, 2012 at 8:01 am

    dvipdfmx -f ipa.map -o ipa.pdf file.dvi

  697. Anonymous said, on February 12, 2012 at 3:38 am
    
    #!/bin/bash
    # This script will create an SSH key for each existing user and create
    #  an authorized_keys file with their public key.
    
    # Directory containing user home directories
    homeDirs=/shared/home
    
    for x in `ls $homeDirs`; do
      echo Creating SSH key for $x...
      
      if [[ -e $homeDirs/$x/.ssh/id_rsa.pub ]]; then
        echo "$x already has a public key"
      else
        su $x -c "ssh-keygen -N \"\""  
      fi
    
      cat $homeDirs/$x/.ssh/id_rsa.pub >> $homeDirs/$x/.ssh/authorized_keys
      chown $x:$x $homeDirs/$x/.ssh/authorized_keys
      chmod 600 $homeDirs/$x/.ssh/authorized_keys
    
    done
    
  698. Password-Less SSH for Future Users said, on February 12, 2012 at 3:43 am
    
    
    #!/bin/bash
    # Creates an SSH key and an authorized_keys file for
    #  a username given as an argument.
    
    # Directory containing user home directorys
    homeDirs=/home/shared
    
    if ! [[ "$1" ]]
    then
      echo "Usage: ./sshauthhostkeygen username"
      exit 1
    fi
    
    x=`echo $1`
    
    echo Creating SSH key for $x...
    
    if ! id $x > /dev/null 2>&1
    then
      echo $x is not a valid user.
      exit 1
    fi
      
    if ! [[ -e $homeDirs/$x ]]; then
      echo $x does not have a home directory.
      exit 1
    fi
    
    if [[ -e $homeDirs/$x/.ssh/id_rsa.pub ]]; then
      echo "$x already has a public key"
    else
      su $x -c "ssh-keygen -N \"\""  
    fi
    
    cat $homeDirs/$x/.ssh/id_rsa.pub >> $homeDirs/$x/.ssh/authorized_keys
    chown $x:$x $homeDirs/$x/.ssh/authorized_keys
    chmod 600 $homeDirs/$x/.ssh/authorized_keys
    
    
  699. Anonymous said, on February 12, 2012 at 3:50 am

    :

    your code here
    :

    The language parameter controls how the code is syntax highlighted. The following languages are supported:

    * actionscript3
    * bash
    * clojure
    * coldfusion
    * cpp
    * csharp
    * css
    * delphi
    * erlang
    * fsharp
    * diff
    * groovy
    * html
    * javascript
    * java
    * javafx
    * matlab (keywords only)
    * objc
    * perl
    * php
    * text
    * powershell
    * python
    * r
    * ruby
    * scala
    * sql
    * vb
    * xml

  700. 日本語サブジェクトでコマンド実行結果をメールする said, on February 12, 2012 at 4:07 am
    
    #!/bin/bash
     
    SUB=$(echo "日本語" | nkf -j)
    echo "MIME-Version: 1.0
    Content-Type: text/plain; charset=\"ISO-2022-JP\"
    Content-Transfer-Encoding: 7bit'
    Subject: ${SUB}
    From: ryosuke@example.com
    To: ryosuke@example.jp
     
    $(ls -l)
    " | /usr/sbin/sendmail -t
    exit 0
    
    
  701. Posting Source Code said, on February 12, 2012 at 4:09 am

    ]sourcecode language=”css”[
    your code here
    [/sourcecode]

  702. Posting Source Code said, on February 12, 2012 at 4:16 am

    フォントの埋め込み
    ipaフォントの埋め込みを設定する場合
    # updmap-sys –enable KanjiMap=ptex-ipa.map
    ipaフォントの埋め込みを解除する場合
    # updmap-sys –disable ptex-ipa.map

  703. Posting Source Code said, on February 13, 2012 at 12:10 pm

    Turn on sshd by running any one of the following:
    service sshd start
    Code:

    /etc/init.d/ssh start

    Verify ssh port is open
    Code:

    netstat -tulpn | grep :22

    Make sure firewall is not blocking access to port 22
    Code:

    /sbin/iptables -L -n

  704. Anonymous said, on February 13, 2012 at 7:02 pm

    The scp command acts a little different when it comes to ports. You’d expect that specifying a port should be done this way:

    [rechosen@localhost ~]$ scp -p yourport yourusername@yourserver:/home/yourusername/examplefile .

    However, that will not work. You will get an error message like this one:

    cp: cannot stat `yourport’: No such file or directory

    This is caused by the different architecture of scp. It aims to resemble cp, and cp also features the -p option. However, in cp terms it means ‘preserve’, and it causes the cp command to preserve things like ownership, permissions and creation dates. The scp command can also preserve things like that, and the -p option enables this feature. The port specification should be done with the -P option. Therefore, the following command will work:

    [rechosen@localhost ~]$ scp -P yourport yourusername@yourserver:/home/yourusername/examplefile .

    Also note that the -P option must be in front of the (remote) server. The ssh command will still work if you put -p yourport behind the host syntax, but scp won’t. Why? Because scp also supports copying between two servers and therefore needs to know which server the -P option applies to.

  705. Anonymous said, on February 14, 2012 at 8:20 pm

    1. yum-updatesd の停止

    # /etc/rc.d/init.d/yum-updatesd stop

    2. yum-updatesd の自動起動の停止

    # chkconfig yum-updatesd off
    # chkconfig –list yum-updatesd
    yum-updatesd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

  706. Anonymous said, on February 14, 2012 at 8:24 pm

    [root@centos ~]# echo “sshd: ALL” >> /etc/hosts.allow
    [root@centos ~]# echo “ALL: ALL” >> /etc/hosts.deny

    ヒント

    hosts.allowとhosts.denyは、hosts.allowが優先されます。
    /etc/hosts.allowでsshdの接続を全てのホストから許可(それ以降のルールは無視される)
    /etc/hosts.denyで全ての接続を拒否(allowで許可されたルール以外は全て拒否される)
    ローカルのみアクセスを許可する場合は /etc/hosts.allowの「sshd: ALL」を「sshd: 192.168.1.」に変更。

  707. CentOS 6.2 初期設定 said, on February 14, 2012 at 8:35 pm

    CentOS 6.2 初期設定

    * はじめに
    * 初回起動時の設定
    o ライセンス情報
    o ユーザーの作成
    o 日付と時刻
    o Kdump
    * vimの設定
    * SELinuxの設定
    o SELinuxの各種操作について
    * SSHの設定
    * ファイアウォールの設定
    * ipv6の無効化
    * 不要サービスの停止
    * パッケージのアップデート
    * yumの設定
    * システム統計情報の取得(sysstat)
    o sysstatのインストール
    o sysstatの設定
    o sysstatの起動設定
    o システム統計情報の確認
    * ログの確認

  708. /boot/grub/grub.confを編集して、GRUBの挙動を変更する。
    対象とするkerbelのtitleのセッティングの中の”kernel”で始まる行の末尾に次の記述を加える。
      nouveau.modeset=0

    そうすると、だいたいこのような記述になるはずです。
    kernel /vmlinuz-2.6.32-71.29.1.el6.x86_64 ro
    root=UUID=3dxxxxxx-fxxx-xxxb-xbxa-xdxxfdbaxxex rd_NO_LUKS rd_NO_LVM
    rd_NO_MD rd_NO_DM LANG=ja_JP.UTF-8 KEYBOARDTYPE=pc KEYTABLE=jp106
    crashkernel=128M rhgb quiet nouveau.modeset=0

  709. Configure NFS Server v3 and v4 on Scientific Linux 6 and Red Hat Enterprise Linux (RHEL) 6 said, on February 24, 2012 at 3:35 pm
    # vi /etc/sysconfig/nfs
    

    RQUOTAD_PORT=875
    LOCKD_TCPPORT=32803
    LOCKD_UDPPORT=32769
    MOUNTD_PORT=892
    STATD_PORT=662
    STATD_OUTGOING_PORT=2020

    We now need to modify the iptables firewall configuration to allow access to the NFS ports. I will use the “iptables” command and insert the appropriate rules:

    # iptables -I INPUT -m multiport -p tcp --dport 111,662,875,892,2049,32803 -j ACCEPT
    # iptables -I INPUT -m multiport -p udp --dport 111,662,875,892,2049,32769 -j ACCEPT
    

    Now save the iptables configuration to the config file so it will apply when the system is restarted:

    # service iptables save
    
  710. Anonymous said, on February 27, 2012 at 5:37 pm

    DEVICE=”eth1″
    NM_CONTROLLED=”yes”
    ONBOOT=yes
    TYPE=Ethernet
    BOOTPROTO=none
    IPADDR=192.168.0.180
    PREFIX=24
    GATEWAY=192.168.0.1
    DNS1=192.168.0.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME=”System eth1″
    UUID=
    HWADDR=

  711. Anonymous said, on March 29, 2012 at 1:02 pm

    # yum –enablerepo=rpmforge search hogehoge
    # yum –enablerepo=epel search hogehoge
    # yum –enablerepo=remi search hogehoge

  712. Anonymous said, on April 18, 2012 at 12:20 am

    install acrobat reader
    yum install libgtk-x11-2.0.so.0

  713. Anonymous said, on April 18, 2012 at 12:22 am

    install acrobat reader
    yum install libxml2.i686 libgtk-x11-2.0.so.0

  714. Anonymous said, on April 18, 2012 at 12:23 am

    yum install libxml2.i686

  715. Anonymous said, on April 19, 2012 at 4:34 pm

    Definition for: 386
    Nickname for the 80386.A 32-bit microprocessor from Intel with a clock speed of 33 MHz.The 80386 is used in PCs.

    Definition for: 586
    Pentium.The Intel high-performance microprocessor introduced in 1993, also called P5 or 80586.It is about twice as fast as the 486.

    Definition for: 686
    The Pentium Pro.Successor to the Pentium microprocessor; also called P6 or 80686.The 686 has internal RISC architecture and a CISC-RISC translator.It is faster than the Pentium for 32-bit software but slower for 16-bit software

  716. Anonymous said, on April 19, 2012 at 4:44 pm

    x86 refers to a popular set of instructions most commonly used in processors from Intel, AMD, VIA, and others. It usually implies a binary compatibility with the 32-bit instruction set of the 80386 (a.k.a. i386).

    i386 (as eluded to above) is the common name for the Intel386 (or 80386) based PCs. It is sometimes emphasized as x86-32 (for 32-bit) and x86-64 (also called x64 – for 64-bit).

  717. C++11 : FNV-1 and FNV-1a compile-time string hashing said, on April 24, 2012 at 8:58 am

    https://gist.github.com/1255697

  718. C++11 : FNV-1 and FNV-1a compile-time string hashing said, on April 24, 2012 at 9:01 am
    
    // C++11 32bit FNV-1 and FNV-1a string hasing (Fowler–Noll–Vo hash)
    //
    // Requires a compiler with C++11 support
    // See main(...) for examples
    
    #include <iostream>
    #include <cassert>
    
    namespace hash
    {
    template <typename S> struct fnv_internal;
    template <typename S> struct fnv1;
    template <typename S> struct fnv1a;
    
    template <> struct fnv_internal<uint32_t>
    {
    constexpr static uint32_t default_offset_basis = 0x811C9DC5;
    constexpr static uint32_t prime = 0x01000193;
    };
    
    template <> struct fnv1<uint32_t> : public fnv_internal<uint32_t>
    {
    constexpr static inline uint32_t hash(char const*const aString, const uint32_t val = default_offset_basis)
    {
    return (aString[0] == '\0') ? val : hash( &aString[1], ( val * prime ) ^ uint32_t(aString[0]) );
    }
    };
    
    template <> struct fnv1a<uint32_t> : public fnv_internal<uint32_t>
    {
    constexpr static inline uint32_t hash(char const*const aString, const uint32_t val = default_offset_basis)
    {
    return (aString[0] == '\0') ? val : hash( &aString[1], ( val ^ uint32_t(aString[0]) ) * prime);
    }
    };
    } // namespace hash
    
    int main(int argc, char* argv[])
    {
    using namespace hash;
    static_assert( fnv1<uint32_t>::hash("FNV Hash Test") == 0xAE2253F1, "fnv1_32::hash failure" );
    static_assert( fnv1a<uint32_t>::hash("FNV Hash Test") == 0xF38B3DB9, "fnv1a_32::hash failure" );
    
    assert( fnv1<uint32_t>::hash("FNV Hash Test") == 0xAE2253F1 );
    assert( fnv1a<uint32_t>::hash("FNV Hash Test") == 0xF38B3DB9 );
    
    for(int ii=1;ii<argc;ii++)
    {
    const uint32_t inputNumber = atoi(argv[ii]);
    switch(inputNumber)
    {
    case fnv1<uint32_t>::hash("FNV Hash Test"):
    std::cout << "Hey, you input the FNV-1 hash of the static_assert test case!" << std::endl;
    break;
    case fnv1a<uint32_t>::hash("FNV Hash Test"):
    std::cout << "Hey, you input the FNV-1a hash of the static_assert test case!" << std::endl;
    break;
    }
    
    std::cout << " FVN-1 (\"" << argv[ii] << "\") = " << fnv1<uint32_t>::hash(argv[ii]) << std::endl
    << " FVN-1a (\"" << argv[ii] << "\") = " << fnv1a<uint32_t>::hash(argv[ii]) << std::endl;
    }
    
    return EXIT_SUCCESS;
    }
    
    
  719. Testing hash functions said, on April 24, 2012 at 9:22 am

    The most important test for a hash function is distribution on a sample of the expected input. No hash function is best for all possible inputs, which is why I introduced a large number of algorithms in this tutorial. Sometimes one of the good hash functions will work better than the others, and that one should be used. Other times they will all be fairly equal and you can choose at random. The key here is that a hash function should never be used blindly without testing it, no matter how good the author says it is. Often, hash tests are designed around a hash function, and that introduces a bias in favor of that function.

    A test for distribution is a simple affair. Just take a sample of the expected input and insert it into a chained hash table with the chosen function. Work out the statistics of chain length, and you can determine how many collisions were detected. Alternatively, a quick test for collisions can be performed without the use of a hash table by simply taking a sample input with no duplicates and counting collisions with an existence table:

    function collisions: file, n
    begin
    table[n] = {0}

    while get ( file, buffer ) do
    table[hash ( buffer ) % n] +:= 1
    loop

    for i := 0 to n do
    println table[i]
    loop
    end

    Another alternative is to plug the hash function into my jsw_hlib library and run it with a few files of sample input. This saves you the trouble of having to work out a collision test, or designing and implementing a working hash table while calculating several more useful measurements than just collisions.

  720. Testing hash functions said, on April 24, 2012 at 9:46 am

    Hash tables are popular data structures for storing key-value pairs. A hash function is used to map the key value (usually a string) to array index. The functions are different from cryptographic hash functions, because they should be much faster and don’t need to be resistant to preimage attack. There are two classes of the functions used in hash tables:

    Multiplicative hash functions, which are simple and fast, but have a high number of collisions;
    More complex functions, which have better quality, but take more time to calculate.

    Hash function benchmarks usually include theoretical metrics such as the number of collisions or distribution uniformity (see, for example, hash function comparison in the Red Dragon book). Obviously, you will have a better distribution with more complex functions, so they are winners in these benchmarks.

    The question is whether using complex functions gives you a faster program. The complex functions require more operations per one key, so they can be slower. Is the price of collisions high enough to justify the additional operations?

  721. Anonymous said, on April 24, 2012 at 10:09 am

    Choosing a Good Hash Function, Part 2
    AK Tech Blog

  722. Anonymous said, on April 25, 2012 at 4:49 pm

    Elegant ways to count the frequency of words in a file

  723. Anonymous said, on April 26, 2012 at 10:47 am

    Download Windows 7 ISO (Official 32-bit and 64-bit Direct Download Links)

  724. Anonymous said, on April 30, 2012 at 7:00 pm

    sudo apt-get –purge remove xserver-xorg-video-nouveau

  725. VMware インストールメモ said, on May 1, 2012 at 10:21 am
    $ sudo apt-get install patch
    $ wget http://weltall.heliohost.org/wordpress/wp-content/uploads/2012/01/vmware802fixlinux320.tar.gz
    $ tar -xf vmware802fixlinux320.tar.gz
    $ sudo ./patch-modules_3.2.0.sh
    
  726. Anonymous said, on May 1, 2012 at 10:23 am

    uninstall vmware

    sudo vmware-installer -u vmware-player

  727. 権力 said, on May 15, 2012 at 3:09 am

    google: “Linux / UNIX one liner to ping all hosts on the LAN”

  728. Anonymous said, on May 15, 2012 at 3:17 am

    Using rsh or ssh, Raw Ethernet, and Cluster Computing Courses

    One of the strong features of ssh that Robert did not mention was the scalability of ssh. Due to its design rsh often has problems when the node count exceeds 256

    what is wrong with rsh: 1) no security at all, 2) no environment passing, 3) no tunneling/port forwarding, 4) no intrinsic X11 support, 5) archaic and easily spoofed/snooped authentication mechanism, 6) terrible control for ” no password” login, and 7) more or less frozen, unsupported code. He thought the only good thing about rsh was that it was relatively fast.

    On the other hand Robert thought that ssh has a number of good points: 1) strong security, 2) environment passing, 3) port tunneling/forwarding, 4) intrinsic X11 support, 5) strong host authentication, 6) strong personal authentication, 7) bidirectional encryption, not easily snooped, 8) good control for ” no password” login, and 9) active code support.

    In fairness, there were somethings Robert does not like about ssh: 1) relatively slow, 2) cannot select ” no encryption” as an option even on secure networks, and 3) poor tty disconnect “feature” that requires ~. escapes (nested yet) to leave a job in the background from an ssh session.

  729. Anonymous said, on May 15, 2012 at 3:28 am

    [user@node2 ~]$ cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=node2

  730. Anonymous said, on May 15, 2012 at 3:31 am

    shell$ cat hostfile-eth
    192.148.3.180
    192.148.3.181
    192.148.3.182
    192.148.3.183

  731. Anonymous said, on May 15, 2012 at 3:32 am

    shell$ mpiexec -f hostfile-eth -n 4 ./app1

  732. Anonymous said, on May 17, 2012 at 3:44 pm

    If the entire address consists of only 2 parts, then the hostname is equivalent to the domain name.
    If the entire address consists of more than 2 parts, then the hostname is equivalent to all the left most pieces before the right 2 parts (or the domain name)

  733. Anonymous said, on May 17, 2012 at 4:27 pm

    If you want that only 192.168.1.1 from your internal network can access to the firewall through ssh and weblet, you will have:

    ssh: 192.168.1.1/255.255.255.255
    www: 192.168.1.1/255.255.255.255
    stat: 192.168.1.1/255.255.255.255

  734. Anonymous said, on May 17, 2012 at 4:43 pm

    /etc/host.conf:

    # Lookup names via DNS first then fall back to /etc/hosts.
    order bind,hosts
    # We have machines with multiple IP addresses.
    multi on
    # Check for IP address spoofing.
    nospoof on

  735. NTFS said, on June 9, 2012 at 6:27 pm
    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    yum --enablerepo=rpmforge install fuse fuse-ntfs-3g 
    
  736. Anonymous said, on June 9, 2012 at 6:50 pm

    ]sourcecode language=”bash”]

    [/sourcecode]

  737. tmux said, on June 9, 2012 at 6:52 pm
    unbind C-b
    set -g prefix C-t
    # Set status bar
    set -g status-bg black
    set -g status-fg white
    set -g status-left "#[fg=green]#H"
    
    # Splitting window
    bind v split-window -h
    bind s split-window -v
    
    # Highlight active window
    set-window-option -g window-status-current-bg red 
    bind j select-pane -D
    bind k select-pane -U
    bind h select-pane -L
    bind l select-pane -R
    bind C-j select-pane -D
    bind C-k select-pane -U
    bind C-h select-pane -L
    bind C-l select-pane -R
    
    # Resizing pane
    # resize pane with arrow keys
    # -r: can be repeated without pressing prefix
    #     again (500ms after last '-r' action or prefix)
    unbind Left
    unbind Right
    unbind Down
    unbind Up
    bind -r Left resize-pane -L 2
    bind -r Right resize-pane -R 2
    bind -r Down resize-pane -D 2
    bind -r Up resize-pane -U 2
    
  738. bash said, on June 9, 2012 at 6:55 pm
    # .bashrc
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
    	. /etc/bashrc
    fi
    
    # User specific aliases and functions
    alias ali="alias"
    alias cp='cp -i'
    alias cdd='cd ~/Desktop'
    alias df='df -h -T'
    alias ec='export LANG=C'
    alias hs='history'
    alias l.='ls -d --color=tty'
    alias la='ls -la'
    alias ll='ls -l --color=tty'
    alias ls='ls --color=auto'
    alias mv='mv -i'
    alias ps15='ps -eo pcpu,pid,user,args | sort -k 1 -r | head -15'
    alias rm='rm -i'
    alias sb='source ~/.bashrc'
    alias sc='screen'
    alias tarc='tar cvzf'
    alias tarx='tar xvzf'
    alias u='cd ../;ls'
    alias uu='cd ../../;ls'
    alias uuu='cd ../../../;ls'
    alias vb='vi ~/.bashrc'
    alias vi='vim'
    alias la='ls -la'
    alias platex="platex -kanji=utf8"
    alias skype="~/skype/skype&"
    alias acroreadopt="/opt/Adobe/Reader9/bin/acroread"
    alias prv="~/opt/paraview/bin/paraview&"
    alias bkcmd="echo scp -P 22201 -r dir/ admin@192.168.0.120:/share/ShareFolder"
    
    alias hdfview="~/opt/HDFView/hdfview"
    
    
    export CUDA_HOME="/usr/local/cuda"
    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64
    export PATH=${CUDA_HOME}/bin:${PATH}
    export PATH=/usr/local/teTeX/bin:$PATH
    export PATH=/usr/lib/:$PATH
    export TERM=xterm-256color
    
    #Qt 4.7
    export PATH=/usr/local/Trolltech/Qt-4.7.4/bin:$PATH
    
    #PGI Fortran
    export PATH=/opt/pgi/linux86-64/2011/bin:$PATH
    export MAINPATH=/opt/pgi/linux86-64/2011/man:$MAINPATH
    export LM_LICENSE_FILE=/opt/pgi/license.dat:$LM_LICENSE_FILE:
    
    
    #MPIch1
    #export PATH=/opt/pgi/linux86-64/2011/mpi/mpich/bin:$PATH
    
    #MPIch2 GCC
    export PATH=~/opt/mpich2_gcc/bin:$PATH
    export HYDRA_HOST_FILE=/etc/hosts
    
    #MPIch2 PGI 
    #export PATH=~/opt/mpich2_pgi/bin:$PATH
    
    #VTK_python
    #export PATH=~/opt/vtk/bin:$PATH
    #export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/opt/vtk/lib/vtk-5.8
    #export PYTHONPATH=$PYTHONPATH:~/opt/VTK/Wrapping/Python/:~/opt/VTK/Wrapping/Python/vtk:~/opt/VTK/bin
    
  739. Anonymous said, on July 3, 2012 at 4:57 pm

    # cat /boot/grub/menu.lst
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,0)
    # kernel /boot/vmlinuz-version ro root=/dev/sde1
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sde

    # …………….
    title Windows 7
    rootnoverify (hd1,1)
    chainloader +1

  740. Anonymous said, on July 4, 2012 at 10:40 am
    
    #include <stdio.h>
    #include <mpi.h>
    
    int main(int argc, char *argv[]) {
      int numprocs, rank, namelen;
      char processor_name[MPI_MAX_PROCESSOR_NAME];
    
      MPI_Init(&argc, &argv);
      MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
      MPI_Comm_rank(MPI_COMM_WORLD, &rank);
      MPI_Get_processor_name(processor_name, &namelen);
    
      printf("Process %d on %s out of %d\n", rank, processor_name, numprocs);
    
      MPI_Finalize();
    }
    
    
    
  741. Anonymous said, on July 4, 2012 at 10:42 am

    mpirun -f hostfile -np 2 ./a.out

  742. Anonymous said, on July 4, 2012 at 10:42 am

    mpicc -lstdc++ test.cpp

  743. How to test Internet connection speed from command line said, on July 4, 2012 at 11:51 am

    curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip

  744. Anonymous said, on August 29, 2012 at 3:57 pm
    
    set nocompatible " use vim defaults
    set ls=2 " allways show status line
    set tabstop=4 " numbers of spaces of tab character
    set shiftwidth=4 " numbers of spaces to auto or nonauto indent
    set scrolloff=3 " keep 3 lines when scrolling
    set showcmd " display incomplete commands
    set hlsearch " highlight searches
    set incsearch " do incremental searching
    set ruler " show the cursor position all the time
    set visualbell t_vb= " turn off error beep/flash
    set novisualbell " turn off visual bell
    set nobackup " do not keep a backup file
    set number " show line numbers
    set ignorecase " ignore case when searching
    "set noignorecase " don’t ignore case
    set title " show title in console title bar
    set ttyfast " smoother changes
    "set ttyscroll=0 " turn off scrolling, didn’t work well with PuTTY
    set modeline " last lines in document sets vim mode
    set modelines=3 " number lines checked for modelines
    set shortmess=atI " Abbreviate messages
    set nostartofline " don’t jump to first character when paging
    set whichwrap=b,s,h,l,,[,] " move freely between files
    
    " Filetypes au = autocmd
    au FileType helpfile set nonumber " no line numbers when viewing help
    au FileType helpfile nnoremap " Enter selects subject
    au FileType helpfile nnoremap " Backspace to go back
    
    " When using mutt, text width=72
    au FileType mail,tex set textwidth=72
    au FileType cpp,c,java,sh,pl,php,asp set autoindent
    au FileType cpp,c,java,sh,pl,php,asp set smartindent
    au FileType cpp,c,java,sh,pl,php,asp set cindent
    "au BufRead mutt*[0-9] set tw=72
    set background=dark
    filetype plugin on
    set nohlsearch
    nnoremap <silent> <F5> :TlistToggle<CR>
    nnoremap <silent> <F2> :w<CR>
    let Tlist_Exit_OnlyWindow = 1     " exit if taglist is last window open
    let Tlist_Show_One_File = 1       " Only show tags for current buffer
    let Tlist_Enable_Fold_Column = 0  " no fold column, only showing one file
    
    
  745. Anonymous said, on September 10, 2012 at 6:24 pm

    Step 1. Add 2 Network cards to the Linux box

    Step 2. Verify the Network cards, check if they installed properly or not

    Step 3. Configure eth0 for Internet with a Public (External network or Internet)
    # cat ifcfg-eth0

    DEVICE=eth0
    BOOTPROTO=none
    BROADCAST=xx.xx.xx.255 # Optional Entry
    HWADDR=00:50:BA:88:72:D4 # Optional Entry
    IPADDR=xx.xx.xx.xx
    NETMASK=255.255.255.0 # Provided by the ISP
    NETWORK=xx.xx.xx.0 # Optional
    ONBOOT=yes
    TYPE=Ethernet
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes
    GATEWAY=xx.xx.xx.1 # Provided by the ISP
    

    Step 4. Configure eth1 for LAN with a Private IP (Internal private network)

    # cat ifcfg-eth1

    BOOTPROTO=none
    PEERDNS=yes
    HWADDR=00:50:8B:CF:9C:05 # Optional
    TYPE=Ethernet
    IPV6INIT=no
    DEVICE=eth1
    NETMASK=255.255.0.0 # Specify based on your requirement
    BROADCAST=""
    IPADDR=192.168.1.1 # Gateway of the LAN
    NETWORK=192.168.0.0 # Optional
    USERCTL=no
    ONBOOT=yes
    

    Step 5. Host Configuration (Optional)

    # cat /etc/hosts

    127.0.0.1 nat localhost.localdomain localhost
     

    Step 6. Gateway Configuration

    # cat /etc/sysconfig/network

     
    NETWORKING=yes
    HOSTNAME=nat
    GATEWAY=xx.xx.xx.1 # Internet Gateway, provided by the ISP
     

    Step 7. DNS Configuration

    # cat /etc/resolv.conf

    nameserver 208.67.222.222 # Primary DNS Server provided by the ISP
    nameserver 208.67.220.220 # Secondary DNS Server provided by the ISP
     

    Step 8. NAT configuration with IP Tables

    First of all you have to flush and delete existing firewall rules. So flush rules by typing in terminal:

    iptables -F
    iptables -t nat -F
    iptables -t mangle -F
    

    Now delete these chains:

    iptables -X
    iptables -t nat -X
    iptables -t mangle -X
     

    # Set up IP FORWARDing and Masquerading

    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    iptables -A FORWARD -i eth1 -j ACCEPT
     

    # Enables packet forwarding by kernel (save this setting in /etc/sysctl.conf file)

    echo 1 &gt; /proc/sys/net/ipv4/ip_forward
      

    and edit to make the change permanent
    cat /etc/sysctl.conf

    net.ipv4.ip_forward=1
      

    #Apply the configuration

    service iptables save
    service iptables restart
     

    # Check if iptables is set to start during boot up

    chkconfig –list iptables
     

    Step 9. Testing

    Ping the Gateway of the network from client system: ping 192.168.2.1
    Try it on your client systems: ping google.com

    Configuring PCs on the network (Clients)

    All PC’s on the private office network should set their “gateway” to be the local private network IP address of the Linux gateway computer.
    The DNS should be set to that of the ISP on the internet.

  746. Anonymous said, on October 3, 2012 at 12:09 pm
    
    export PS1="\[\e[36;1m\]\u@\[\e[32;1m\]\H\[\e[31;1m\][\w]\[\e[33;1m\]\$\[\e[0m\]"
    
    
  747. Anonymous said, on October 22, 2012 at 11:56 am
    export PS1="\n\[\e[32;1m\][\[\e[36;1m\]\u\[\e[33;1m\]@\H\[\e[31;1m\]:\w\[\e[32;1m\]]-[\[\e[34;1m\]jobs:\j\[\e[32;1m\]]\n[\[\e[37;1m\]!\!\[\e[32;1m\]]-> \[\e[0m\]"
    export HISTFILESIZE=100000
    export HISTTIMEFORMAT="[ %y/%h/%d - %H:%M:%S ] "
    export GREP_OPTIONS="--color=auto"
    export GREP_COLOR='1;31;40'
    export LIBGL_ALWAYS_INDIRECT=y
    
    
  748. Anonymous said, on October 24, 2012 at 10:47 am
    
    export PS1="\n\[\e[32;1m\][\[\e[34;1m\]jobs: \[\e[31;1m\]\j\[\e[32;1m\]]-\[\e[32;1m\][\[\e[36;1m\]\u[\e[33;1m\]@\H\[\e[31;1m\]:\w\[\e[32;1m\]]\n[\[\e[37;1m\]!\!\[\e[32;1m\]]-> \[\e[0m\]"
    
    
  749. Anonymous said, on October 24, 2012 at 11:00 am

    export PS1="\n\[\e[32;1m\][\[\e[34;1m\]jobs: \[\e[31;1m\]\j\[\e[32;1m\]]-\[\e[32;1m\][\[\e[36;1m\]\u\[\e[33;1m\]@\H\[\e[31;1m\]:\w\[\e[32;1m\]]\n[\[\e[37;1m\]!\!\[\e[32;1m\]]-> \[\e[0m\]"

  750. Anonymous said, on October 24, 2012 at 11:02 am
    
    export PS1="\n\[\e[32;1m\][\[\e[34;1m\]jobs: \[\e[31;1m\]\j\[\e[32;1m\]]-\[\e[32;1m\][\[\e[36;1m\]\u\[\e[33;1m\]@\H\[\e[31;1m\]:\w\[\e[32;1m\]]\n[\[\e[37;1m\]!\!\[\e[32;1m\]]-> \[\e[0m\]"
    
    
    
  751. Anonymous said, on October 24, 2012 at 12:05 pm
    
    export PS1="\n\[\e[32;1m\][\[\e[36;1m\]jobs: \[\e[31;1m\]\j\[\e[32;1m\]]-\[\    e[32;1m\][\[\e[36;1m\]\u\[\e[33;1m\]@\H\[\e[31;1m\]:\w\[\e[32;1m\]]-\[\e[32;    1m\][\[\e[37;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files,     \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')B\[\e[32;1m\]    ]\n[\[\e[37;1m\]!\!\[\e[32;1m\]]-> \[\e[0m\]"
    
    
  752. Anonymous said, on October 24, 2012 at 7:09 pm
    
    filesize=$(du -sh|awk '{print $1}')
    
    export PS1="\n\[\e[32;1m\][\[\e[36;1m\]jobs: \[\e[31;1m\]\j\[\e[32;1m\]]-\[\e[32;1m\][\[\e[36;1m\]\u\[\e[33;1m\]@\H\[\e[31;1m\]:\w\[\e[32;1m\]]-\[\e[32;1m\][\[\e[36;1m\]Total size: \[\e[31;1m\]\${filesize}B\[\e[32;1m\]]\n[\[\e[37;1m\]!\!\[\e[32;1m\]]-> \[\e[0m\]"
    
    
    
  753. Anonymous said, on October 31, 2012 at 1:33 pm

    yum install libXaw-devel

  754. Anonymous said, on November 2, 2012 at 8:02 pm

    /var/log/boot.log : 起動メッセージ…
    /var/log/cron : cronの実行結果…
    /var/log/lastlog : ユーザの最終ログイン時間…
    /var/log/maillog : メール関連…
    /var/log/messages : 各種システムメッセージ…
    /var/log/rpmpkgs : インストール済みRPMパッケージ一覧…
    /var/log/secure : 認証関連…
    /var/run/utmp : 現在ログインしているユーザ情報…
    /var/log/wtmp : ログイン履歴…
    /var/log/xferlog : FTP関連…

  755. Anonymous said, on November 2, 2012 at 8:31 pm

    yum –enablerepo=home_sawaa install mozc+dict ibus-mozc

  756. gEdit 文字化け対策 CentOS6.3 自分用メモ said, on November 5, 2012 at 3:26 pm
    
    http://investnora.blog7.fc2.com/blog-entry-157.html
    
    
  757. Anonymous said, on November 11, 2012 at 4:20 pm

    __foo__: this is just a convention, a way for the Python system to use names that won’t conflict with user names.

    _foo: this is just a convention, a way for the programmer to indicate that the variable is private (whatever that means in Python).

    __foo: this has real meaning: the interpreter replaces this name with _classname__foo as a way to ensure that the name will not overlap with a similar name in another class.

    No other form of underscores have meaning in the Python world.

    There’s no difference between class, variable, global, etc in these conventions.

  758. Anonymous said, on November 11, 2012 at 6:17 pm

    http://www2.cs.cas.cz/harrachov/slides/Gijzen.pdf

  759. Anonymous said, on November 11, 2012 at 8:08 pm

    http://www.geuz.org/pipermail/gmsh/2008/003655.html

  760. Anonymous said, on November 14, 2012 at 3:12 pm

    Three important points must be kept in mind about the CramerRao bound:

    1) the bound pertains only to unbiased estimators, biased estimators may violate the
    lower bound
    2) the bound may be unreachable in practice, and
    3) maximum likelihood estimators
    achieve the lower bound as the size of the measurement set tends to infinity

  761. Anonymous said, on November 14, 2012 at 3:38 pm

    Econometrics is the application of the tools of mathematical statistics to economic questions and evidence. There are many principles and methods that can be applied to estimation and inference in econometrics. But all involve optimization of some criterion subject
    to some constraints.
    (1) BEST ⇒ minimize the variance of an estimator subject to the constraint that
    the bias is zero
    (2) BLUE ⇒ same as (1) plus a restriction to linear functions of the data (the
    “dependent” variable)
    (3) MSE ⇒ minimize the sum of the bias
    2
    and the variance of the estimator
    (4) Least Squares ⇒ minimize the sum of squared “errors” for the estimator
    (5) Least Absolute Deviations ⇒ minimize the mean absolute deviation of the
    estimator from the unknown parameter
    (6) Maximum Likelihood ⇒ maximize the joint density function for the data
    with respect to the parameter estimator
    (7) Method of Moments ⇒ use sample moments matched to population moments to obtain “robust” consistent parameter estimates

  762. Help stamp out GL_PROJECTION abuse said, on November 16, 2012 at 11:09 am

    By Steve Baker

    One of the most common OpenGL programming errors is misuse of the GL_PROJECTION matrix stack. This matrix stack is often perceived as being the correct place to put the position and orientation of the ‘camera’ – but this is not in fact the case.
    Unfortunately, when someone does go and put their camera transform into the GL_PROJECTION matrix (instead of into GL_MODELVIEW where it belongs) – the consequences are rather subtle:

    Lighting: OpenGL has to transform vertex normals into world coordinate space – that is to say WITHOUT the effects of perspective – but WITH the effects of the camera position. Hence, only the GL_MODELVIEW matrix is applied to the normals for lighting. If you put the camera transform into the GL_PROJECTION matrix then your lighting will be wrong. However, some people do their own lighting – and in any case, it can be a subtle error that you might not have noticed previously.

    Fog: OpenGL has to figure out how far each vertex is from the camera. Once again, perspective effects are not relevent to this calculation – so the GL_PROJECTION matrix is not used. If you put the camera transform into the GL_PROJECTION matrix then your fogging will be wrong. Since few people use fog, many people have the error and don’t know it.

    TexGen: Since OpenGL uses the eyepoint to figure out some of the TexGen’ed texture coordinates, if the camera position is all mixed up with the projection information then you’ll end up with some pretty strange texture coordinates. (Thanks to Brian Sharp at 3Dfx for pointing this one out)

    Z-buffer: I believe (but have no proof) that a screwed up GL_PROJECTION matrix could cause your Z values to be computed strangely. This would likely only manifest itself as a lack of Z precision under some circumstances – so you might not notice – and it might not matter.

    So, it’s easy to see how someone could have a program that pretty much works correctly – that would appear to fail when the programmer first tries to play with Fog – or first notices a peculiar lighting anomaly. Perhaps one might not notice until switching to a new OpenGL implementation causes the behaviour to break.
    Hence, most people are very disbelieving when their problems are diagnosed as projection abuse.

    The Golden Rule.

    The rule is:
    The only functions that should be called when the glMatrixMode is set to GL_PROJECTION are:

    glLoadIdentity – to initialise the stack.
    gluPerspective/glFrustum/glOrtho/gluOrtho2 – to set the appropriate projection onto the stack.
    You *could* use glLoadMatrix to set up your own projection matrix (if you understand the restrictions and consequences) – but I’m told that this can cause problems for some OpenGL implementations which rely on data passed to glFrustum, etc to determine the near and far clip planes.
    Mitigating Circumstances.

    It is actually possible to store the camera position in the GL_PROJECTION matrix under certain VERY specific circumstances – and if you are VERY familiar with OpenGL and attempting to use it only for rasterization. However, it is pretty much always the case that if you are asking the question then you don’t understand enough to deal with the answer. If you don’t already know what I mean then don’t do it.
    OK, So how DO I set up the Camera?

    Well, you need to push the inverse of the camera position/orientation transform onto the GL_MODELVIEW stack before you start drawing polygons. If you use gluLookAt to do this, it’s fairly painless – but using glRotate/glTranslate is likely to cause problems for all but the simplest camera motion since you want the INVERSE of the camera location.

  763. Anonymous said, on November 16, 2012 at 11:20 am

    8.070 How can I automatically calculate a view that displays my entire model? (I know the bounding sphere and up vector.)

    The following is from a posting by Dave Shreiner on setting up a basic viewing system:
    First, compute a bounding sphere for all objects in your scene. This should provide you with two bits of information: the center of the sphere (let ( c.x, c.y, c.z ) be that point) and its diameter (call it “diam”).
    Next, choose a value for the zNear clipping plane. General guidelines are to choose something larger than, but close to 1.0. So, let’s say you set

    zNear = 1.0;
    zFar = zNear + diam;
    Structure your matrix calls in this order (for an Orthographic projection):
    GLdouble left = c.x - diam;
    GLdouble right = c.x + diam;
    GLdouble bottom c.y - diam;
    GLdouble top = c.y + diam;
    
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(left, right, bottom, top, zNear, zFar);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    
    

    This approach should center your objects in the middle of the window and stretch them to fit (i.e., its assuming that you’re using a window with aspect ratio = 1.0). If your window isn’t square, compute left, right, bottom, and top, as above, and put in the following logic before the call to glOrtho():

    GLdouble aspect = (GLdouble) windowWidth / windowHeight;
    
    if ( aspect &lt; 1.0 ) { // window taller than wide
       bottom /= aspect;
       top /= aspect;
    } else {
       left *= aspect;
       right *= aspect;
    }
    

    The above code should position the objects in your scene appropriately. If you intend to manipulate (i.e. rotate, etc.), you need to add a viewing transform to it.
    A typical viewing transform will go on the ModelView matrix and might look like this:

    GluLookAt (0., 0., 2.*diam,
                    c.x, c.y, c.z,
                    0.0, 1.0, 0.0);
    
    
  764. Anonymous said, on November 20, 2012 at 10:00 am
    #!/usr/bin/python
    import csv
    from PIL import Image
    from pylab import *
    import scipy.misc
    import matplotlib.delaunay as md
    from vec3 import *
    
    def triangulate_points(x,y):
    	""" Delaunay triangulation of 2D points. """
    	centers,edges,tri,neighbors = md.delaunay(x,y)
    	return tri
    
    def show_result(x,y):
    	xa = array(x)
    	ya = array(y)
    	triangles = triangulate_points(xa,ya)
    	for t in triangles:
    		t_ext = [t[0], t[1], t[2], t[0]]
    		plot(xa[t_ext],ya[t_ext],'r')
    
    	plot(x,y,'*')
    	axis('off')
    	show()
    	return 0
    
    def bfs(tree, start, end):
        queue = []
        queue.append([start])
        while queue:
            path = queue.pop(0)
            node = path[-1]
            if node == end:
                return path
            for adjacent in tree.get(node, []):
                new_path = list(path)
                new_path.append(adjacent)
                queue.append(new_path)
    
    
  765. Anonymous said, on November 20, 2012 at 10:03 am
    
    '''
    Simple class for 3D vectors.
    Requires: Python 2.5 and numpy 1.0.4
    
    (c) Ilan Schnell, 2008
    '''
    import numpy
    import math
    
    _TINY = 1e-15
    
    def _xyzto012(c):
        if c in 'xyz':
            return ord(c) - ord('x')
        else:
            raise AttributeError("vec3 instance has no attribute '%s'" % c)
    
    
    def _args2tuple(funcname, args):
        narg = len(args)
        if narg == 0:
            data = 3*(0,)
        elif narg == 1:
            data = args[0]
            if len(data) != 3:
                raise TypeError('vec3.%s() takes sequence with 3 elements '
                                '(%d given),\n\t   when 1 argument is given' %
                                 (funcname, len(data)))
        elif narg == 3:
            data = args
        else:
            raise TypeError('vec3.%s() takes 0, 1 or 3 arguments (%d given)' %
                            (funcname, narg))
        assert len(data) == 3
        try:
            return tuple(map(float, data))
        except (TypeError, ValueError):
            raise TypeError("vec3.%s() can't convert elements to float" % funcname)
    
    
    class vec3(numpy.ndarray):
        def __new__(cls, *args):
            if len(args) == 1:
                if isinstance(args[0], vec3):
                    return args[0].copy()
                if isinstance(args[0], numpy.matrix):
                    return vec3(args[0].flatten().tolist()[0])
            data = _args2tuple('__new__', args)
            arr = numpy.array(data, dtype=numpy.float, copy=True)
            return numpy.ndarray.__new__(cls, shape=(3,), buffer=arr)
        
        def __repr__(self):
            return 'vec3' + repr(tuple(self))
        
        def __mul__(self, other):
            return numpy.dot(self, other)
        
        def __abs__(self):
            return math.sqrt(self * self)
        
        def __pow__(self, x):
            return (self * self) if x == 2 else pow(abs(self), x)
        
        def __eq__(self, other):
            return abs(self-other) < _TINY
        
        def __ne__(self, other):
            return not self == other
        
        def __getattr__(self, name):
            return self[_xyzto012(name)]
        
        def __setattr__(self, name, val):
            self[_xyzto012(name)] = val
        
        def get_spherical(self):
            r = abs(self)
            if r < _TINY:
                theta = phi = 0.0
            else:
                x, y, z = self
                theta = math.acos(z/r)
                phi = math.atan2(y, x)
            
            return r, theta, phi
        
        def set_spherical(self, *args):
            r, theta, phi = _args2tuple('set_spherical', args)
            self[0] = r * math.sin(theta) * math.cos(phi);
            self[1] = r * math.sin(theta) * math.sin(phi);
            self[2] = r * math.cos(theta);
        
        def get_cylindrical(self):
            x, y, z = self
            rho = math.sqrt(x*x + y*y)
            phi = math.atan2(y, x)
            return rho, phi, z
        
        def set_cylindrical(self, *args):
            rho, phi, z = _args2tuple('set_cylindrical', args)
            self[0] = rho * math.cos(phi);
            self[1] = rho * math.sin(phi);
            self[2] = z
    
    
    def cross(a, b):
        return vec3(numpy.cross(a, b))
    
    
    if __name__ == '__main__':
        import doctest, os
        fname = 'doc.txt'
        if os.access(fname, os.R_OK):
            doctest.testfile(fname)
            os.system('rm /tmp/data.*')
    
    
  766. Anonymous said, on November 20, 2012 at 10:16 am
    #!/usr/bin/python
    from vec3 import *
    
    if __name__ == "__main__":
    	nl = [] # node list
    	n1 = vec3(1.1,1.1,1.1)
    	n2 = vec3(2.1,1.1,1.1)
    	n3 = vec3(3.1,1.1,1.1)
    	n4 = vec3(4.1,1.1,1.1)
    	n5 = vec3(5.1,1.1,1.1)
    	n6 = vec3(6.1,1.1,1.1)
    	n7 = vec3(7.1,1.1,1.1)
    	n8 = vec3(8.1,1.1,1.1)
    	n9 = vec3(9.1,1.1,1.1)
    	n10 = vec3(10.1,1.1,1.1)
    	n11 = vec3(11.1,1.1,1.1)
    	n12 = vec3(12.1,1.1,1.1)
    
    	nl.append(n1)
    	nl.append(n2)
    	nl.append(n3)
    	nl.append(n4)
    	nl.append(n5)
    	nl.append(n6)
    	nl.append(n7)
    	nl.append(n8)
    	nl.append(n9)
    	nl.append(n10)
    	nl.append(n11)
    	nl.append(n12)
    
    	tree = {}
    	tree[nl[0]] = [n2,n3,n4]
    	tree[nl[1]] = [n5,n6]
    	tree[nl[4]] = [n9,n10]
    	tree[nl[3]] = [n7,n8]
    	tree[nl[6]] = [n11,n12]
    
    	for id in range(2):
    		print tree[nl[id]][0], "\n"
    
    	depth = {}
    	depth[0] = [n1]
    	for i in range(3):
    		kids = []
    		for node in depth[i]:
    			kids = kids + tree.get(node, []) 
    		depth[i+1] = kids 
    
    	print depth[1]
    	for y in range(4):
    		for x in range(len(depth[y])):
    			print 10*x, 10*y	
    
  767. Anonymous said, on November 22, 2012 at 10:28 am

    ArrayFire is a fast software library for GPU computing with an easy-to-use API. Its array-based function set makes GPU programming simple. ArrayFire is available for C, C++, and Fortran and integrates with AMD, Intel, and NVIDIA hardware. Best of all, ArrayFire is free for most users!

  768. Anonymous said, on November 23, 2012 at 9:24 pm

    Image-Based Geometric Modeling and Mesh Generation

  769. Anonymous said, on December 3, 2012 at 1:36 pm

    Fixed-size C-style arrays are easy, but if you want to vary the dimensions things get complicated. For example, given arr[x][y], you can’t tell whether arr is an array of arrays, an array of pointers, a pointer to an array, or a pointer to a pointer; all for implementations are legitimate, depending on your needs. And probably most real-world use cases for multidimensional arrays require the size to be determined at run time.

  770. Anonymous said, on December 20, 2012 at 3:44 pm

    Principles of Successful Design

    +Increase cohesion where possible
    ++Separation of concerns
    ++Focused experts

    +Decrease coupling where possible
    ++Simplify interfaces
    ++Reduce connections in number and volume

    +Employ and support reuse
    ++Reuse existing designs and code where possible
    ++Increase reusability where possible
    ++Design for portability

    +Design for Flexibility
    ++Orthogonal evolution in many dimensions
    ++Anticipate obsolescence

    +Design for testability
    ++Use priorities and objectives to decide among alternatives

    +Prefer type (interface) inheritance over class (implementation) inheritance.
    ++Program to the interface, not the implementation.

    +Prefer composition to inheritance:
    ++Deferred binding
    ++Cost: Performance

    +Use delegation to “simulate” runtime inheritance.

  771. nike free run 3 said, on January 9, 2013 at 5:11 pm

    Right away I am ready to do my breakfast,
    once having my breakfast coming yet again to
    read more news.

  772. michael kors said, on January 9, 2013 at 11:03 pm

    Hi there to every single one, it’s really a fastidious for me to pay a visit this website, it includes precious Information.

  773. discount prescription glasses said, on January 14, 2013 at 7:30 pm

    You should be a part of a contest for one of the greatest
    sites online. I will highly recommend this web site!

  774. Anonymous said, on January 16, 2013 at 11:27 am

    W#TK8TP#
    8#9JN6P#
    R#7X7WW#
    P#RFFTV#
    LK#B7QPF#

  775. Anonymous said, on January 26, 2013 at 12:25 am

    Change the default shell from bash to zsh

    sudo chsh -s $(which zsh) john
    

    or

    sudo chsh -s /bin/zsh/ john
    
  776. Anonymous said, on January 26, 2013 at 12:27 am

    Decrease SSH Login Grace Time
    Another security option you may want to consider, is to lower the LoginGraceTime parameter to about 30 seconds.
    LoginGraceTime 30
    The login grace time is a period of time where a user may be connected but has not begun the authentication process. By default, sshd will allow a connected user to wait 120 seconds (2 minutes) before starting to authenticate.

    By shortening this time, you can decrease the chances of someone attempting a brute force attack against your SSH server from being successfull.

    Read more: http://linuxpoison.blogspot.jp/2010/02/how-to-secure-your-ssh-server.html#ixzz2J09K7u1b

  777. Anonymous said, on January 27, 2013 at 8:42 pm

    How to install GoldenDict on CentOS 6.x

    On CentOS, we need these packages for successfully compiling:

    vorbis-tools-1.2.0-7.el6.i686 libvorbis-1.2.3-4.el6_2.1.i686
    libvorbis-devel-1.2.3-4.el6_2.1.i686

    zlib-devel-1.2.3-27.el6.i686
    zlib-1.2.3-27.el6.i686

    hunspell-devel-1.2.8-16.el6.i686

    xorg-x11-proto-devel-7.6-13.el6.noarch

    qt-4.6.2-20.el6.i686 qt-devel-4.6.2-20.el6.i686

    phonon-devel-4.3.1 (rebuild from src.rpm of Fedora 16)

    libXtst bzip2-devel git

    Get the latest source-code with GIT

    git clone https://github.com/goldendict/goldendict.git

    build the source-codes

    cd goldendict && qmake && make

    install

    run: make install with root priviledges to system-wide installation

    link: http://cauhoi.wordpress.com/2012/02/20/how-to-install-goldendict-on-centos-6-x/

  778. Anonymous said, on January 28, 2013 at 3:04 pm

    Disable SSH Password

    ChallengeResponseAuthentication no
    PasswordAuthentication no
    UsePAM no
    PubkeyAuthentication yes

  779. Anonymous said, on January 28, 2013 at 3:47 pm

    Disabling unnecessary services on CentOS

    Here’s a list of stuff I disabled, why I turned it off and a convenient copy-paste command.

    I don’t have RAID disks on a virtual machine, so:
    chkconfig mdmonitor off

    I don’t need kernel auditing because I dumped SElinux anyway, so:
    chkconfig auditd off

    I already have cron, that’s enough, so:
    chkconfig anacron off
    chkconfig atd off

    The first boot is already behind me, so:
    chkconfig firstboot off

    No need for CPU speed optimizalition on a virtual machine:
    chkconfig cpuspeed off

    I’m using only a single core, single CPU, so:
    chkconfig irqbalance off

    There’s no smartcard reader, so
    chkconfig pcscd off

    Won’t need network discovery either, so:
    chkconfig avahi-daemon off

    Not gonna use NTFS since the rest is all Windows, so:
    chkconfig nfslock off
    chkconfig rpcgssd off
    chkconfig rpcidmapd off

    Nope, no printers for you either, so:
    chkconfig cups off

    It’s already behind a firewall, so:
    chkconfig iptables off
    chkconfig ip6tables off

    No way bluetooth will work in a virtual machine, so
    chkconfig bluetooth off

    Hardware is not gonna change, so:
    chkconfig kudzu off

    Let’s dump the harddisk monitoring too:
    chkconfig smartd off

    Nothing to automount as well:
    chkconfig autofs off

    Who needs a mouse in the shell?
    chkconfig gpm off

    I’ll just run yum when I want, no need to notify me.
    chkconfig yum-updatesd off

    Links: http://www.latunyi.com/57/disabling-unnecessary-services-on-centos-5-5/

  780. Anonymous said, on January 29, 2013 at 9:24 pm

    customize SSH in 「$HOME/.ssh/config」

    Host hostname
    HostName hostname.example.com
    IdentityFile ~/.ssh/id_rsa_filename
    User user

  781. Anonymous said, on February 7, 2013 at 7:50 pm

    This will show you how to permanently delete a Folder using the RD or RMDIR command from within a command prompt. This can be handy if you cannot delete the folder using the normal methods.

    RD /S /Q "Full Path of Folder"
    

    The folder will be deleted immediately and not placed in the Recycle Bin first. Deleting a folder using this command will also delete all of it’s contents as well as the folder. Be sure to backup anything you want to keep in the folder first.

    link: http://www.sevenforums.com/tutorials/55721-folder-delete-command-prompt.html

  782. ext4 and ntfs paritions said, on February 7, 2013 at 10:11 pm

    An Error message of Disk Utility

    Quote:
    error creating file system: helper exited with exit code 1: cannot spawn ‘mkntfs -f -L “Storage” /dev/sdb3′: Failed to execute child process “mkntfs” (No such file or directory)

    The problem is solved by Installing ntfsprogs, a complete set of tools for NTFS (mkntfs included):

    yum install ntfsprogs
    
  783. Anonymous said, on February 7, 2013 at 10:27 pm

    ]sourcecode language=”bash”]

    [/sourcecode]

  784. 03-NAT.sh said, on February 7, 2013 at 10:57 pm
    iptables -F
    iptables -t nat -F
    iptables -t mangle -F
    iptables -X
    iptables -t nat -X
    iptables -t mangle -X
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    iptables -A FORWARD -i eth1 -j ACCEPT
    
    
  785. read.sh said, on February 7, 2013 at 11:06 pm
    curl -u name@gmail.com:password --silent "https://mail.google.com/mail/feed/atom" |
      perl -ne \
      '
        print "Subject: $1\n " if /<title>(.+?)<\/title>/ && $title++;
        print "From: $1\n\n" if /<email>(.+?)<\/email>/;
      '
    
  786. send.py said, on February 7, 2013 at 11:23 pm
    # -*- coding: utf-8 -*-
    import codecs
    import smtplib
    from email.MIMEText import MIMEText
    from email.Header import Header
    from email.Utils import formatdate
    
    def send(from_addr, to_addr, msg):
        try:
    	s = smtplib.SMTP('mail.domain.net', 26)
       
        	s.login('name@domain.net', 'password')
        	s.sendmail(from_addr, [to_addr], msg.as_string())
        	s.close()
        except smtplib.SMTPException, e:
    	print "Error" 	
    
    def create_message(from_addr, to_addr, subject, body):
        msg = MIMEText(body, 'plain', 'utf-8')
        msg['Subject'] = Header(subject, 'utf-8')
        msg['From'] = from_addr
        msg['To'] = to_addr
        msg['Date'] = formatdate()
        return msg
    
    if __name__ == '__main__':
    
        fin = codecs.open('filename.txt', 'r','utf-8')
        txt=fin.read()
       
        from_addr = 'from@address1.net'
        to_addr = 'to@address2.net'
        body =txt.encode('utf-8')
       
        subject = 'Incomming email'
        msg = create_message(from_addr, to_addr, subject, body)
        send(from_addr, to_addr, msg)
    
  787. alert.sh said, on February 7, 2013 at 11:29 pm
    cd /home/username/scripts/;
    sh read.sh >newMail.txt;
    diff newMail.txt oldMail.txt| grep '<' | tr -d '<' | tr -d '>' >filename.txt;
    mv -f newMail.txt oldMail.txt;
    python send.py;
    cd
    
  788. No. 1: Test inputs rigorously
    No. 2: Store what you need, and not one bit more
    No. 3: Avoid trusting passwords more than necessary
    No. 4: Negotiate requirements
    No. 5: Add delays to your code
    No. 6: Use encryption more often than you think you should
    No. 7: Build walls
    No. 8: Tested libraries — use them
    No. 9: Use internal APIs
    No. 10: Bring in outside auditors to critique your code
    No. 11: Code analyzers are your friend
    No. 12: Limit privilege
    No. 13: Model your threat
    No. 14: Trust goes both ways
    No. 15: Keep apprised of the latest threats
    No. 16: Deep research can pay off
    No. 17: Educate yourself

  789. Anonymous said, on February 8, 2013 at 12:28 pm

    A person who never made a mistake never tried anything new. -Albert Einstein

  790. Anonymous said, on February 8, 2013 at 12:35 pm

    “There is nothing more powerful than an idea whose time has come”. -Victor Hugo

  791. Anonymous said, on February 8, 2013 at 10:14 pm

    How to Delete the “Windows.old” Folder in Windows 8

    link: http://www.eightforums.com/tutorials/2527-windows-old-folder-delete-windows-8-a.html

  792. Anonymous said, on February 10, 2013 at 12:02 am

    “Your needs will be met once you can find a way of projecting energy and fulfilling someone else’s need.”
    – Stuart Wilde Biography, Self Help Author and Lecturer

  793. Anonymous said, on February 10, 2013 at 12:03 am

    “Imagination is more important than knowledge.”
    – Albert Einstein, Theoretical Physicist

  794. Anonymous said, on February 10, 2013 at 12:05 am

    “Life is 10 percent what you make it, and 90 percent how you take it. ”
    – Irving Berlin, American Composer and Lyricist

  795. Anonymous said, on February 10, 2013 at 12:06 am

    “Courage is what it takes to stand up and speak. Courage is also what it takes to sit down and listen. ”
    – Winston Churchill, British prime minister

  796. Anonymous said, on February 10, 2013 at 12:08 am

    “Always look at what you have left. Never look at what you have lost.”
    – Robert Schuller, Clergyman

  797. Anonymous said, on February 10, 2013 at 12:09 am

    “sometimes when you innovate, you make mistake. It is best to admit them quickly and get on with improving your other innovations.”
    – Steve Jobs, Apple Co-Founder

  798. Anonymous said, on February 10, 2013 at 12:11 am

    “I have never known a really successful man who deep in his heart did not understand the grind, the discipline it takes to win.”
    – Vince Lombardi, American Football Coach

  799. Anonymous said, on February 10, 2013 at 12:12 am

    “The future you see is the future you get.”
    – Robert G Allen, Business, Finance & Motivational Author

  800. Anonymous said, on February 10, 2013 at 12:13 am

    “Some people fold after making one timid request. They quit too soon. Keep asking until you find the answers. In sales there are usually four or five “no’s” before you get a “yes.” ”
    – Jack Canfield, Success Coach

  801. Anonymous said, on February 10, 2013 at 12:14 am

    “No matter what accomplishments you make, somebody helped you.”
    – Althea Gibson, Tennis Player

  802. Anonymous said, on February 10, 2013 at 12:15 am

    “The real winners in life are the people who look at every situation with an expectation that they can make it work or make it better.”
    – Barbara Pletcher, author

  803. Anonymous said, on February 10, 2013 at 12:16 am

    “I really do think that any deep crisis is an opportunity to make your life extraordinary in some way.”
    – Martha Beck, Author

  804. Anonymous said, on February 10, 2013 at 12:20 am

    “Destiny is not a matter of chance, it’s a matter of choice; it is not a thing to be waited for, it is a thing to be achieved.”
    – William Jennings Bryan, 41st United States Secretary of State

  805. Anonymous said, on February 10, 2013 at 12:22 am

    “The great creators-the thinkers, the artists, the scientists, the inventors-stood alone against the men of their time.”
    – Ayn Rand, writer

  806. Anonymous said, on February 10, 2013 at 12:24 am

    “A champion is one who gets up even when he can’t.”
    – Jack Dempsey, Heavyweight Boxing Champion

  807. Anonymous said, on February 10, 2013 at 12:25 am

    “We are what we repeatedly do.”
    – Aristotle, Philosopher

  808. Anonymous said, on February 10, 2013 at 12:28 am

    “In the middle of difficulty lies opportunity”
    – Albert Einstein, Theoretical Physicist

  809. Anonymous said, on February 10, 2013 at 2:44 am

    A virtual console is a shell prompt in a non-graphical environment, accessed from the physical machine, not remotely. Multiple virtual consoles can be accessed simultaneously.

  810. Anonymous said, on February 10, 2013 at 2:46 am

    console keystrokes contents
    1 ctrl-alt-f1 installation dialog
    2 ctrl-alt-f2 shell prompt
    3 ctrl-alt-f3 install log (messages from installation program)
    4 ctrl-alt-f4 system-related messages
    5 ctrl-alt-f5 other messages
    6 ctrl-alt-f6 x graphical display

  811. Anonymous said, on February 10, 2013 at 2:49 am

    Now, hold down [ALT]+[CTRL] then press F1, F2, F3…to F6 you will be redirected different virtual consoles.
    press [ALT]+[CTRL]+F7 to back to above GUI screen.

  812. Anonymous said, on February 10, 2013 at 2:52 am

    A virtual console (VC) – also known as a virtual terminal (VT) – is a conceptual combination of the keyboard and display for a computer user interface. It is a feature of some operating systems such as UnixWare, Linux, and BSD, in which the system console of the computer can be used to switch between multiple virtual consoles to access unrelated user interfaces. Virtual consoles date back at least to Xenix in the 1980s.[1]
    Usually in Linux (see Linux console), the first six virtual consoles provide a text terminal with a login prompt to a Unix shell. The graphical X Window System starts in the seventh virtual console. In Linux, the user switches between them with the key combination Alt plus a function key – for example Alt+F1 to access the virtual console number 1. Alt+Left arrow changes to the previous virtual console and Alt+Right arrow to the next virtual console. To switch from the X Window System, Ctrl+Alt+function key works. (Note that users can redefine these default key combinations.)

  813. Anonymous said, on February 10, 2013 at 6:15 pm

    The purpose of computing is insight, not numbers.
    – Richard Wesley Hamming (1915–1998)

  814. Anonymous said, on February 10, 2013 at 6:16 pm

    It is better to solve the right problem the wrong way than to solve the wrong problem the
    right way.
    – Richard Wesley Hamming (1915–1998)

  815. Anonymous said, on February 10, 2013 at 7:52 pm

    “Sometimes it happens that a man’s circle of horizon becomes smaller and smaller, and as the radius approaches zero it concentrates on one point. And then that becomes his point of view.”
    – David Hilbert

  816. Anonymous said, on February 11, 2013 at 7:25 pm

    “Wise men talk because they have something to say; fools, because they have to say something.”
    – Plato, Philosopher

  817. Anonymous said, on February 11, 2013 at 7:26 pm

    “The only difference between successful people and unsuccessful people is extraordinary determination.”
    – Mary Kay Ash, Entrepreneur

  818. Anonymous said, on February 11, 2013 at 7:28 pm

    “The greater danger for most of us lies not in setting our aim too high and falling short, but in setting our aim too low and achieving our mark.”
    – Michelangelo, Artist

  819. Anonymous said, on February 12, 2013 at 6:25 pm
    
    double random(double min, double max) {
        timeval t1;
        gettimeofday(&t1, NULL);
        srand(t1.tv_usec * t1.tv_sec);
        double random = ((double) rand()) / (double) RAND_MAX;
        double range = max - min;
        random= min+random*range;
        return random;
    }
    
    
  820. XKCD-style Plots in Matplotlib said, on February 13, 2013 at 4:07 pm
    
    # Some helper functions
    def norm(x, x0, sigma):
        return np.exp(-0.5 * (x - x0) ** 2 / sigma ** 2)
    
    def sigmoid(x, x0, alpha):
        return 1. / (1. + np.exp(- (x - x0) / alpha))
        
    # define the curves
    x = np.linspace(0, 1, 100)
    y1 = np.sqrt(norm(x, 0.7, 0.05)) + 0.2 * (1.5 - sigmoid(x, 0.8, 0.05))
    
    y2 = 0.2 * norm(x, 0.5, 0.2) + np.sqrt(norm(x, 0.6, 0.05)) + 0.1 * (1 - sigmoid(x, 0.75, 0.05))
    
    y3 = 0.05 + 1.4 * norm(x, 0.85, 0.08)
    y3[x > 0.85] = 0.05 + 1.4 * norm(x[x > 0.85], 0.85, 0.3)
    
    # draw the curves
    ax = pl.axes()
    ax.plot(x, y1, c='gray')
    ax.plot(x, y2, c='blue')
    ax.plot(x, y3, c='red')
    
    ax.text(0.3, -0.1, "Yard")
    ax.text(0.5, -0.1, "Steps")
    ax.text(0.7, -0.1, "Door")
    ax.text(0.9, -0.1, "Inside")
    
    ax.text(0.05, 1.1, "fear that\nthere's\nsomething\nbehind me")
    ax.plot([0.15, 0.2], [1.0, 0.2], '-k', lw=0.5)
    
    ax.text(0.25, 0.8, "forward\nspeed")
    ax.plot([0.32, 0.35], [0.75, 0.35], '-k', lw=0.5)
    
    ax.text(0.9, 0.4, "embarrassment")
    ax.plot([1.0, 0.8], [0.55, 1.05], '-k', lw=0.5)
    
    ax.set_title("Walking back to my\nfront door at night:")
    
    ax.set_xlim(0, 1)
    ax.set_ylim(0, 1.5)
    
    # modify all the axes elements in-place
    XKCDify(ax, expand_axes=True)
    
    

    link: http://jakevdp.github.com/blog/2012/10/07/xkcd-style-plots-in-matplotlib/

  821. Anonymous said, on February 13, 2013 at 5:36 pm

    “You get the best out of others when you get the best out of yourself.”
    – Harvey Firestone, tire executive

  822. Anonymous said, on February 13, 2013 at 5:38 pm

    “The man who removes a mountain begins by carrying away small stones.”
    – William Faulkner

  823. Anonymous said, on February 13, 2013 at 6:00 pm
    
    #include <GL/glut.h>
    
    void init2D(float r, float g, float b)
    {
    	glClearColor(r,g,b,0.0);  
    	glMatrixMode (GL_PROJECTION);
    	gluOrtho2D (0.0, 200.0, 0.0, 150.0);
    }
    
    void display(void)
    {
    	glClear(GL_COLOR_BUFFER_BIT);
    	glColor3f(1.0, 0.0, 0.0);
    
    	//draw two points
    	glBegin(GL_POINTS);
    	for(int i = 0; i < 10; i++)
    	{
    		glVertex2i(10+5*i,110);
    	}
    	glEnd();
    
    	//draw a line
    	glBegin(GL_LINES);
    		glVertex2i(10,10);
    		glVertex2i(100,100);
    	glEnd();
    
    	glFlush();
    }
    
    void main(int argc,char *argv[])
    {
    	glutInit(&argc,argv);
    	glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
    	glutInitWindowSize (500, 500);
    	glutInitWindowPosition (100, 100);
    	glutCreateWindow ("points and lines");
    	init2D(0.0,0.0,0.0);
    	glutDisplayFunc(display);
    	glutMainLoop();
    }
    
    
  824. Anonymous said, on February 14, 2013 at 1:38 pm

    There are Many Ways to Import a Module #

    Python provides at least three different ways to import modules. You can use the import statement, the from statement, or the builtin __import__ function. (There are more contrived ways to do this too, but that’s outside the scope for this small note.)

    Anyway, here’s how these statements and functions work:

    import X imports the module X, and creates a reference to that module in the current namespace. Or in other words, after you’ve run this statement, you can use X.name to refer to things defined in module X.

    from X import * imports the module X, and creates references in the current namespace to all public objects defined by that module (that is, everything that doesn’t have a name starting with “_”). Or in other words, after you’ve run this statement, you can simply use a plain name to refer to things defined in module X. But X itself is not defined, so X.name doesn’t work. And if name was already defined, it is replaced by the new version. And if name in X is changed to point to some other object, your module won’t notice.

    from X import a, b, c imports the module X, and creates references in the current namespace to the given objects. Or in other words, you can now use a and b and c in your program.

    Finally, X = __import__(‘X’) works like import X, with the difference that you 1) pass the module name as a string, and 2) explicitly assign it to a variable in your current namespace.

  825. lastlog sort by date said, on February 14, 2013 at 2:20 pm
    lastlog -t 365 | pcregrep -v '(Never Logged In|Username)' | sort -k9,9n -k5,5M -k6,6n -k7,7n | awk -F' ' '{ printf "%-15s %-3s %-2s %-4s\n", $1, $5, $6, $9}'
    
  826. Anonymous said, on February 15, 2013 at 9:27 am

    “You must do the things today that others will not do so that you can have the things tomorrow that others will not have.”
    – Anonymous

  827. Anonymous said, on February 21, 2013 at 10:14 am

    One of the most important concepts ever discovered in the field of human performance is called the “winning edge concept.” This concept or principle, states that, “small differences in ability can translate into enormous differences in results.” – Brian Tracy

  828. Anonymous said, on February 21, 2013 at 10:20 am

    “Vision without action is a daydream. Action without vision is a nightmare.”
    – Japanese Proverb

  829. To install:

    Just copy leo.vim into ~/.vim/colors.

    To use:

    Issue ‘:colorscheme leo’ in vim and you’re done (put ‘colorscheme leo’ in you .vimrc for a permanent setting).

  830. Anonymous said, on February 22, 2013 at 5:17 pm

    “You will become as small as your controlling desire; as great as your dominant aspiration.”
    – James Allen

  831. Anonymous said, on February 22, 2013 at 5:19 pm

    Code folding in vim

    Some common key bindings:

    `za` – toggles

    `zc` – closes

    `zo` – opens

    `zR` – open all

    `zM` – close all

    link: http://smartic.us/2009/04/06/code-folding-in-vim/

  832. Anonymous said, on February 22, 2013 at 5:26 pm

    A strategic plan is a systematic process of envisioning a desired future, and translating this vision into broadly defined goals or objectives and a sequence of steps to achieve them. – businessdictionary.com

  833. Anonymous said, on February 22, 2013 at 5:41 pm

    7 Habits For Effective Text Editing 2.0
    Bram Moolenaar

    Three basic steps:

    1. Detect inefficiency
    2. Find a quicker way
    3. Make it a habit

    Habit 1: Moving around quickly
    Habit 2: Don’t type it twice
    Habit 3: Fix it when it’s wrong
    Habit 4: A file seldom comes alone
    Habit 5: Let’s work together
    Habit 6: Text is structured
    Habit 7: Sharpen the saw

    Link:

    http://www.moolenaar.net/habits_2007.pdf

  834. Anonymous said, on February 22, 2013 at 6:51 pm

    RGB Color Table

    http://gucky.uni-muenster.de/cgi-bin/rgbtab-en

  835. Anonymous said, on February 23, 2013 at 8:00 pm

    Ted’s Categorized Color* Chart:
    BLACK Background

    http://www.tedmontgomery.com/tutorial/clrctgBL.html

  836. Anonymous said, on February 25, 2013 at 10:33 am

    The Top 20 C++ Tips of All Time

    What makes these tips special is that the information they provide usually cannot be found in C++ books or Web sites. For example, pointers to members are one of the most evasive, tricky, and bug-prone issues for even advanced users.

    link: http://www.devx.com/cplus/Article/16328

  837. Anonymous said, on February 25, 2013 at 10:38 am

    C++ Tutorial: 10 New STL Algorithms That Will Make You A More Productive Developer

    C++0x was recently furnished with new algorithms. Some of them fill in gaps in the C++03 Standard Library whereas others are convenience algorithms that simplify recurrent programming tasks by using more intuitive parameter lists and a cleaner interface. In the following sections I will demonstrate 10 such algorithms, all of which save one are brand new.

    http://www.codeguru.com/cpp/article.php/c18131/C-Tutorial-10-New-STL-Algorithms-That-Will-Make-You-A-More-Productive-Developer.htm

  838. Anonymous said, on February 25, 2013 at 10:52 am

    C9 Lectures:

    http://channel9.msdn.com/tags/C9+Lectures

  839. Anonymous said, on February 25, 2013 at 10:55 am

    Discussions on good book for learning the C++ STL on stackoverflow

    http://stackoverflow.com/questions/38499/good-book-for-learning-the-c-standard-template-library

  840. Anonymous said, on February 25, 2013 at 10:58 am

    “Always dream and shoot higher than you know you can do. Don’t bother just to be better than your contemporaries or predecessors. Try to be better than yourself.”
    – William Faulkner, Author

  841. Anonymous said, on February 25, 2013 at 11:03 am

    “Cherish your visions and your dreams, as they are the children of your soul, the blueprints of your ultimate achievements. ”
    – Napoleon Hill, Pioneer of Personal Achievement Philosophy

  842. Anonymous said, on February 25, 2013 at 11:05 am

    “A good goal is like a strenuous exercise – it makes you stretch.”
    – Mary Kay Ash, cosmetics pioneer

  843. Anonymous said, on February 25, 2013 at 11:11 am

    We now know that we do not have a fixed single IQ, but a range of at least seven or eight different forms of intelligence. You will tend to develop some of these intelligences more than others and prefer to use them. And those differences help account for your personal learning style.

    But you will also tend to prefer using one or more of your senses as you learn. Some people are more visual, others more auditory, and still others are more physical — they will prefer to get more ‘hands-on’.

    The secret is this. When the way you are taught closely matches the way you like to learn, results improve significantly and the time you take to learn is reduced.

    That is why Accelerated Learning language home study courses use a whole mixture of activities to ensure that you can use your preferred way of learning.

    link: http://www.acceleratedlearning.com/method/what_is_02.html

  844. Anonymous said, on February 25, 2013 at 11:19 am

    “In many cluster problems, there is a core issue surrounded by a lot of symptoms. Creative thinking requires that you separate the core issue, and then focus on resolving that before worrying about the smaller problems.” -Brian Tracy

  845. Think on paper said, on February 25, 2013 at 11:24 am

    “Make a plan and then work on the plan, updating it, changing it, adding to it as you think of new ways to work toward the goal. The more clearly defined and keenly desired your goals, the more of your natural creativity will be released for goal attainment.” -Brian Tracy

  846. Anonymous said, on February 25, 2013 at 11:29 am

    “We must develop and maintain the capacity to forgive. He who is devoid of the power to forgive is devoid of the power to love. ”
    – Martin Luther King Jr., Civil Rights Activist

  847. Lamda Expressions said, on February 25, 2013 at 11:55 am

    Suppose we want to apply a function to all the elements of a vector. We can define the function locally, since it is a type definition. It can take any context it needs in the constructor, and store it internally.

    This is not as elegant as lisp or perl’s lexical scoping, but it is better than nothing.

    
    function addOffset(vector<int>& v, int n)
    {
    
      // we want to add n to each element of v
      struct AddN : public unary_function<int>
        { AddN(int n) : _n (n) {};
          int operator() (const int& k) { return k + n; }
        };
      transform (v.begin(), v.end(), v.begin(), AddN(n));
    }
    
    

    link: http://www.acmsolver.org/?p=1163

  848. STL said, on February 25, 2013 at 12:03 pm

    Power up C++ with the Standard Template Library: Part I
    link: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary

    Power up C++ with the Standard Template Library: Part II
    link: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary2

  849. Three basic qualities of genius --Brian Tracy said, on February 25, 2013 at 12:30 pm

    There are three basic qualities of genius. Since you are a genius, you should know what
    they are and apply them regularly.

    I. The first quality of genius is open-mindedness. People who are fluent, flexible and
    adaptive in their thinking are far brighter than those who are rigid, mechanical and
    straitlaced. The more open you are to new ideas and possibilities, to new approaches
    and solutions, the more creatively you will function.

    II. The second quality of genius is the ability to concentrate single-mindedly on one thing
    at a time, on one problem at a time. And to stay with it until it’s solved. Highly creative
    people practice focusing on single questions and single problems, while uncreative
    people diffuse their mental energies by trying to do several things at once. They work
    on this and work on that. They pick something up and put it down. Then they go on
    to something else and come back. Often, they are scatterbrained, and if they do come
    up with ideas, their ideas are shallow and poorly thought-out.

    III. The third quality of genius is the ability to approach problems systematically. People
    who throw themselves at their problems often become frantic and confused. They
    take a haphazard approach to thinking, and then they are amazed when they find
    themselves floundering and making no progress.

    link: http://media.briantracy.com/downloads/pdf/UnlockingYourCreativity.pdf

  850. C++ and Beyond 2011 said, on February 25, 2013 at 2:36 pm

    C++ and Beyond 2011: Herb Sutter – Why C++?

  851. Anonymous said, on February 25, 2013 at 2:43 pm

    Bjarne Stroustrup: C++11 Style

  852. Lambdas, Lambdas Everywhere by Herb Sutter said, on February 25, 2013 at 2:48 pm

  853. How to Code Like Bjarne Stroustrup said, on February 25, 2013 at 2:50 pm

  854. How to Code Like Larry Wall said, on February 25, 2013 at 2:53 pm

  855. Vim as a Python IDE- Martin Brochhaus said, on February 25, 2013 at 3:00 pm

  856. Discussion with Guido van Rossum said, on February 25, 2013 at 3:41 pm

  857. C++ and Beyond 2011: Scott, Andrei and Herb - Ask Us Anything said, on February 25, 2013 at 3:48 pm

    Table of Contents (click on the time links to jump directly to the question/topic referenced):

    [00:10] On strings, UTF-8 vs UTF-16, etc…
    [03:08] How does the ISO C++ standards committee work?
    [04:34] On shared_ptr performance and correctness
    [11:30] What C++ work do you guys do outside of your real jobs?
    [14:51] Implementations of atomic…
    [17:07] Memory consistency model…
    [22:13] Favorite C++11 features…
    [24:23] What’s next for the standard’s committee?
    [25:55] How to convince your company it’s OK to use templates now (C++11)…
    [28:30] Favorite feature that’s not in the C++11 standard…
    [30:44] What’s the deal with systematic and principled thread termination and program termination?
    [36:22] Concepts…
    [36:55] What’s going on with constexpr?
    [41:51] When will we see Effective/Exceptional C++ books for C++11?

    link: http://channel9.msdn.com/Shows/Going+Deep/C-and-Beyond-2011-Scott-Andrei-and-Herb-Ask-Us-Anything

  858. New keyboard shortcuts for Windows 8 said, on February 25, 2013 at 5:21 pm

    Windows logo key‌ +start typing
    Search your PC

    Ctrl+plus (+) or Ctrl+minus (-)
    Zoom in or out of a large number of items, like apps pinned to the Start screen

    Ctrl+scroll wheel
    Zoom in or out of a large number of items, like apps pinned to the Start screen

    Windows logo key‌ +C
    Open the charms

    Windows logo key‌ +F
    Open the Search charm to search files

    Windows logo key‌ +H
    Open the Share charm

    Windows logo key‌ +I
    Open the Settings charm

    Windows logo key‌ +J
    Switch the main app and snapped app

    Windows logo key‌ +K
    Open the Devices charm

    Windows logo key‌ +O
    Lock the screen orientation (portrait or landscape)

    Windows logo key‌ +Q
    Open the Search charm to search apps

    Windows logo key‌ +W
    Open the Search charm to search settings

    Windows logo key‌ +Z
    Show the commands available in the app

    Windows logo key‌ +spacebar
    Switch input language and keyboard layout

    Windows logo key‌ +Ctrl+spacebar
    Change to a previously selected input

    Windows logo key‌ +Tab
    Cycle through open apps (except desktop apps)

    Windows logo key‌ +Ctrl+Tab
    Cycle through open apps (except desktop apps) and snap them as they are cycled

    Windows logo key‌ +Shift+Tab
    Cycle through open apps (except desktop apps) in reverse order

    Windows logo key‌ +PgUp
    Move the Start screen and apps to the monitor on the left (Apps in the desktop won’t change monitors)

    Windows logo key‌ +PgDown
    Move the Start screen and apps to the monitor on the right (apps in the desktop won’t change monitors)

    Windows logo key‌ +Shift+period (.)
    Snaps an app to the left

    Windows logo key‌ +period (.)
    Snaps an app to the right

    link: http://windows.microsoft.com/en-US/windows-8/new-keyboard-shortcuts#1TC=t1

  859. Strategic planning said, on February 26, 2013 at 2:02 pm

    Strategic planning is a systematic process of envisioning a desired future, and translating this vision into broadly defined goals or objectives and a sequence of steps to achieve them. In contrast to long-term planning (which begins with the current status and lays down a path to meet estimated future needs), strategic planning begins with the desired-end and works backward to the current status. At every stage of long-range planning the planner asks, “What must be done here to reach the next (higher) stage?” At every stage of strategic-planning the planner asks, “What must be done at the previous (lower) stage to reach here?” Also, in contrast to tactical planning (which focuses at achieving narrowly defined interim objectives with predetermined means), strategic planning looks at the wider picture and is flexible in choice of its means.

    Read more: http://www.businessdictionary.com/definition/strategic-planning.html

  860. Management by exception said, on February 26, 2013 at 2:05 pm

    Management by exception is an administrative style whereby supervisors focus their attention on circumstances and outcomes that differ from considerably what was expected and planned for. Using a management by exception style that only investigates exceptions helps give business managers more time to devote to strategic planning and staff development.

    Read more: http://www.businessdictionary.com/definition/management-by-exception.html

  861. Tactical planning said, on February 26, 2013 at 2:08 pm

    A systematic determination and scheduling of the immediate or short-term activities required in achieving the objectives of strategic planning.

    Read more: http://www.businessdictionary.com/definition/tactical-planning.html

  862. Core competencies said, on February 26, 2013 at 2:12 pm

    Core competencies is a unique ability that a company acquires from its founders or develops and that cannot be easily imitated. Core competencies are what give a company one or more competitive advantages, in creating and delivering value to its customers in its chosen field. Also called core capabilities or distinctive competencies.

    Read more: http://www.businessdictionary.com/definition/core-competencies.html

  863. Objective said, on February 26, 2013 at 2:14 pm

    Objective is a specific result that a person or system aims to achieve within a time frame and with available resources.
    In general, objectives are more specific and easier to measure than goals. Objectives are basic tools that underlie all planning and strategic activities. They serve as the basis for creating policy and evaluating performance.
    Some examples of business objectives include minimizing expenses, expanding internationally, or making a profit.

    Read more: http://www.businessdictionary.com/definition/objective.html

  864. Goal said, on February 26, 2013 at 2:17 pm

    Goal is an objective or target, usually driven by specific future financial needs. Some common financial goals for an individual are: saving for a comfortable retirement, saving to send children to college, managing finances to enable a home purchase, minimizing taxes, maximizing return on investments given a certain risk tolerance, and estate or trust planning. Given a person’s goals, he/she decides on a pattern of expenses and suitable investments that will enable those goals to be achieved. Institutions also have financial goals, for example making certain pension contributions at specific times, or retiring a certain amount of debt by a certain date. Often, both people and institutions find it useful to employ a professional to help them in setting up a financial plan that will enable their goals to be met.

    Read more: http://www.investorwords.com/2187/goal.html

  865. Project said, on February 26, 2013 at 2:24 pm

    Project is a set of related tasks which have a specific goal.

    Read more: http://www.investorwords.com/3893/project.html

  866. pushd and popd said, on February 28, 2013 at 10:24 am

    Bash will keep a history of the directories you visit, you just have to ask.
    Bash stores the history in a stack and uses the commands pushd
    and popd to manage the stack.
    pushd dir – move the current directory onto the stack and change to
    the dir directory.
    popd – pops the top directory off of the stack and moves you into it.
    We’re opening files all over the file system, internal code, vendor code, templates, configuration files, logs. Because of this we like the ability to take a detour on the file system and still navigate back to our working directory of the day. I think these commands are so useful that I alias’d them in my .bashrc

    alias cd="pushd"
    alias bd="popd"
    

    Read more: http://www.oreillynet.com/onlamp/blog/2005/04/bash_tricks_from_the_developer.html

  867. Strategy said, on February 28, 2013 at 10:36 am

    1. A method or plan chosen to bring about a desired future, such as achievement of a goal or solution to a problem.
    2. The art and science of planning and marshalling resources for their most efficient and effective use. The term is derived from the Greek word for generalship or leading an army.

    Read more: http://www.businessdictionary.com/definition/strategy.html

  868. Tactics said, on February 28, 2013 at 10:38 am

    Near term actions taken to solve specific problems or accomplish specific goals.

    Read more: http://www.investorwords.com/4859/tactics.html

  869. Security analysis said, on February 28, 2013 at 10:41 am

    An examination and evaluation of the various factors affecting the value of a security.

    Read more: http://www.investorwords.com/4447/security_analysis.html

  870. Planning said, on February 28, 2013 at 10:42 am

    The process of setting goals, developing strategies, and outlining tasks and schedules to accomplish the goals.

    Read more: http://www.investorwords.com/3710/planning.html

  871. Anonymous said, on February 28, 2013 at 10:48 am

    “You have set yourself a difficult task, but you will succeed if you persevere.”
    – Helen Adams Keller, American Author and Lecturer

  872. Anonymous said, on February 28, 2013 at 10:50 am

    “Ninety percent of all those who fail are not actually defeated. They simply quit.” — Paul J. Meyer

  873. C++0x lambdas said, on February 28, 2013 at 11:10 am
    
    #include <algorithm>
    #include <functional>
     
    // Define a function object for adding a constant to a value
    struct add_constant {
        typedef int result_type;
     
        explicit add_constant(int i)
          : i_(i)
        {}
     
        int operator()(int i) const
        {
            return i + i_;
        }
     
    private:
        int i_;
    };
     
    int main() {
        int data[10] = {0,1,2,3,4,5,6,7,8,9};
     
        // Add 42 to each element in "data" using a stand-alone function object.
        std::transform( data, data+10, data, add_constant(42) );
     
        // Same as above, but using standard binders function function objects.
        std::transform( data, data+10, data, std::bind1st( std::plus<int>(), 42 ) );
    
        // Add 42 to each element in an array using C++0x lambdas.
        std::transform( data, data+10, data, [] (int j) { return j + 42; } );
    }
    

    Read more: http://cpp-next.com/archive/2010/10/expressive-c-expression-extension-part-one/

  874. Lambda and the STL said, on February 28, 2013 at 11:38 am

    One of the biggest beneficiaries of lambda functions are, no doubt, power users of the standard template library algorithms package. Previously, using algorithms like for_each was an exercise in contortions. Now, though, you can use for_each and other STL algorithms almost as if you were writing a normal loop. Compare:

    vector<int> v;
    v.push_back( 1 );
    v.push_back( 2 );
    for ( auto itr = v.begin(), end = v.end(); itr != end; itr++ ){
        cout << *itr;
    }
    

    with

    vector<int> v;
    v.push_back( 1 );
    v.push_back( 2 );
    for_each( v.begin(), v.end(), [] (int val){
        cout << val;
    });
    

    That’s pretty good looking code if you ask me–it reads, and is structured, like a normal loop, but you’re suddenly able to take advantage of the goodness that for_each provides over a regular for loop–for example, guarantees that you have the right end condition. Now, you might wonder, won’t this kill performance? Well, here’s the kicker: it turns out that for_each has about the same performance, and is sometimes even faster than a regular for loop. (The reason: it can take advantage of loop unrolling.)

  875. Install GCC 4.7 said, on February 28, 2013 at 1:50 pm

    I. Install GMP 5.1.1

    
    PREFIX=/opt/local
    cd $HOME/build
    rm -rf gmp-5.1.1
    wget -O - ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.1.tar.bz2 | bzip2 -dc | tar xf -
    cd gmp-5.1.1
    ./configure --prefix=$PREFIX/gcc-4.7.2 --enable-cxx
    make -j4
    make -j4 check
    sudo make install
    

    II. Install MPFR 3.1.1

    cd $HOME/build
    rm -rf mpfr-3.1.1
    wget -O - http://www.mpfr.org/mpfr-3.1.1/mpfr-3.1.1.tar.bz2 | bzip2 -dc | tar xf -
    cd mpfr-3.1.1
    ./configure --prefix=$PREFIX/gcc-4.7.2 --with-gmp=$PREFIX/gcc-4.7.2
    make -j4
    make -j4 check
    sudo make install
    

    III. Install MPC 1.0.1

    cd $HOME/build
    rm -rf mpc-1.0.1
    wget -O - http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz | gzip -dc | tar xf -
    cd mpc-1.0.1
    ./configure --prefix=$PREFIX/gcc-4.7.2 --with-gmp=$PREFIX/gcc-4.7.2 --with-mpfr=$PREFIX/gcc-4.7.2
    make -j4
    make -j4 check
    sudo make install
    

    IV. Install GCC 4.7.2

    cd $HOME/build
    rm -rf gcc-4.7.2 gcc-4.7.2-build
    wget -O - http://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2 | bzip2 -dc | tar xf -
    mkdir gcc-4.7.2-build && cd gcc-4.7.2-build
    ../gcc-4.7.2/configure --enable-languages=c,c++,fortran --prefix=$PREFIX/gcc-4.7.2 --with-gmp=$PREFIX/gcc-4.7.2 --with-mpfr=$PREFIX/gcc-4.7.2 --with-mpc=$PREFIX/gcc-4.7.2 --with-stage1-ldflags="-Wl,-rpath,$PREFIX/gcc-4.7.2/lib" --with-boot-ldflags="-Wl,-rpath,$PREFIX/gcc-4.7.2/lib" --with-multilib-list=m64
    make -j4 bootstrap LD_LIBRARY_PATH=$PREFIX/gcc-4.7.2/lib
    sudo make install
    sudo rm -f $PREFIX/gcc-4.7
    sudo ln -s gcc-4.7.2 $PREFIX/gcc-4.7
    

    link: http://todo.issp.u-tokyo.ac.jp/ja/members/wistaria/log/gcc-4.7

  876. OpenGL Vertex Array said, on February 28, 2013 at 2:26 pm

    Instead you specify individual vertex data in immediate mode (between glBegin() and glEnd() pairs), you can store vertex data in a set of arrays including vertex positions, normals, texture coordinates and color information. And you can draw only a selection of geometric primitives by dereferencing the array elements with array indices.

    Using vertex arrays reduces the number of function calls and redundant usage of shared vertices. Therefore, you may increase the performance of rendering.

    There are 3 different OpenGL functions to use vertex arrays: glDrawArrays(), glDrawElements() and glDrawRangeElements().

    Like glDrawElements(), glDrawRangeElements() is also good for hopping around vertex array. However, glDrawRangeElements() has two more parameters (start and end index) to specify a range of vertices to be prefetched. By adding this restriction of a range, OpenGL may be able to obtain only limited amount of vertex array data prior to rendering, and may increase performance.

    The additional parameters in glDrawRangeElements() are start and end index, then OpenGL prefetches a limited amount of vertices from these values: end – start + 1. And the values in index array must lie in between start and end index. Note that not all vertices in range (start, end) must be referenced. But, if you specify a sparsely used range, it causes unnecessary process for many unused vertices in that range.

    GLfloat vertices[] = {...};          // 8 of vertex coords
    GLubyte indices[] = {0,1,2, 2,3,0,   // first half (18 indices)
                         0,3,4, 4,5,0,
                         0,5,6, 6,1,0,
    
                         1,6,7, 7,2,1,   // second half (18 indices)
                         7,4,3, 3,2,7,
                         4,7,6, 6,5,4};
    //...
    // activate and specify pointer to vertex array
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(3, GL_FLOAT, 0, vertices);
    
    // draw first half, range is 6 - 0 + 1 = 7 vertices used
    glDrawRangeElements(GL_TRIANGLES, 0, 6, 18, GL_UNSIGNED_BYTE, indices);
    
    // draw second half, range is 7 - 1 + 1 = 7 vertices used
    glDrawRangeElements(GL_TRIANGLES, 1, 7, 18, GL_UNSIGNED_BYTE, indices+18);
    
    // deactivate vertex arrays after drawing
    glDisableClientState(GL_VERTEX_ARRAY);
    

    You can find out maximum number of vertices to be prefetched and the maximum number of indices to be referenced by using glGetIntegerv() with GL_MAX_ELEMENTS_VERTICES and GL_MAX_ELEMENTS_INDICES.

    Read more: http://www.songho.ca/opengl/gl_vertexarray.html

  877. Passing a vector into glDrawElements() said, on February 28, 2013 at 2:34 pm
    std::vector<int> drawOrder; 
    //...
    glDrawElements(
        GL_LINES,
        drawOrder.size(), // <<<<<
        GL_UNSIGNED_INT,
        &drawOrder[0] );
    

    Read more: http://stackoverflow.com/questions/14682254/opengl-passing-a-vector-into-gldrawelements

  878. 仏説摩訶般若波羅蜜多心経 said, on February 28, 2013 at 2:56 pm

    観自在菩薩行深般若波羅蜜多時、照見五蘊皆空、度一切苦厄。舎利子。色不異空、空不異色、色即是空、空即是色。受・想・行・識亦復如是。舎利子。是諸法空相、不生不滅、不垢不浄、不増不減。是故空中、無色、無受・想・行・識、無眼・耳・鼻・舌・身・意、無色・声・香・味・触・法。無眼界、乃至、無意識界。無無明、亦無無明尽、乃至、無老死、亦無老死尽。無苦・集・滅・道。無智亦無得。以無所得故、菩提薩埵、依般若波羅蜜多故、心無罣礙、無罣礙故、無有恐怖、遠離一切顛倒夢想、究竟涅槃。三世諸仏、依般若波羅蜜多故、得阿耨多羅三藐三菩提。故知、般若波羅蜜多、是大神呪、是大明呪、是無上呪、是無等等呪、能除一切苦、真実不虚。故説、般若波羅蜜多呪。
    即説呪曰、羯諦羯諦波羅羯諦波羅僧羯諦菩提薩婆訶。般若心経

  879. The Heart Sutra said, on February 28, 2013 at 3:23 pm

    The Perfection of Wisdom

    In this sutra, Avalokiteshvara Bodhisattva is speaking to Shariputra, who was an important disciple of the historical Buddha. The early lines of the sutra discuss the five skandhas — form, sensation, conception, discrimination, and consciousness. The bodhisattva has seen that the skandhas are empty, and thus has been freed from suffering. The bodhisattva speaks: Shariputra, form is no other than emptiness; emptiness no other than form. Form is exactly emptiness; emptiness exactly form. Sensation, conception, discrimination, and consciousness are also like this.

    What Is Emptiness?

    Emptiness (in Sanskrit, shunyata) is a foundational doctrine of Mahayana Buddhism. It is also possibly the most misunderstood doctrine in all of Buddhism. Too often, people assume it means that nothing exists. But this is not the case.

    His Holiness the 14th Dailai Lama said, “The existence of things and events is not in dispute; it is the manner in which they exist that must be clarified.” Put another way, things and events have no intrinsic existence and no individual identity except in our thoughts.

    The Dalai Lama also teaches that “existence can only be understood in terms of dependent origination.” Dependent origination is a teaching that no being or thing exists independently of other beings or things.

    In the Four Noble Truths, the Buddha taught that our distresses ultimately spring from thinking ourselves to be independently existing beings with an intrinsic “self.” Thoroughly perceiving that this intrinsic self is a delusion liberates us from suffering.

    All Phenomena Are Empty

    The Heart Sutra continues, with Avalokiteshvara explaining that all phenomena are expressions of emptiness, or empty of inherent characteristics. Because phenomena are empty of inherent characteristics, they are neither born nor destroyed; neither pure nor defiled; neither coming nor going.

    Avalokiteshvara then begins a recitation of negations — “no eye, ear, nose, tongue, body, mind; no color, sound, smell, taste, touch, thing,” etc. These are the six sense organs and their corresponding objects from the doctrine of the skandhas.

    What is the bodhisattva saying here? Red Pine writes that because all phenomena exist interdependently with other phenomena, all distinctions we make are arbitrary.

    “There is no point at which the eyes begin or end, either in time or in space or conceptually. The eye bone is connected to the face bone, and the face bone is connected to the head bone, and the head bone is connected to the neck bone, and so it goes down to the toe bone, the floor bone, the earth bone, the worm bone, the dreaming butterfly bone. Thus, what we call our eyes are so many bubbles in a sea of foam.”

    The Two Truths

    Another doctrine associated with the Heart Sutra is that of the Two Truths. Existence can be understood as both ultimate and conventional (or, absolute and relative). Conventional truth is how we usually see the world, a place full of diverse and distinctive things and beings. The ultimate truth is that there are no distinctive things or beings.

    The important point to remember with the two truths is that they are two truths, not one truth and one lie. Thus, there are eyes. Thus, there are no eyes. People sometimes fall into the habit of thinking that the conventional truth is “false,” but that’s not correct.

    No Attainment

    Avalokiteshvara goes on to say there is no path, no wisdom, and no attainment. Referring to the Three Marks of Existence, Red Pine writes, “The liberation of all beings revolves around the liberation of the bodhisattva from the concept of being.” Because no individual being comes into existence, neither does a being cease to exist.

    Because there is no cessation, there is no impermanence, and because there is no impermanence, there is no suffering. Because there is no suffering, there is no path to liberation from suffering, no wisdom, and no attainment of wisdom. Thoroughly perceiving this is “supreme perfect enlightenment,” the bodhisattva tells us.

    Read more: http://buddhism.about.com/od/mahayanasutras/a/heart-sutra.htm

  880. Making a flat list out of list of lists in Python said, on February 28, 2013 at 9:45 pm
    l = [[1,2,3],[4,5,6], [7], [8,9]]
    l2 = sum(l, [])
    
  881. Understanding imports and PYTHONPATH said, on March 1, 2013 at 9:55 am

    An understanding of PYTHONPATH is key when developing new Python modules, or installing third-party packages and eggs. This article gives an overview of PYTHONPATH and the way Python imports modules.

    Read more: http://www.stereoplex.com/blog/understanding-imports-and-pythonpath

  882. Anonymous said, on March 1, 2013 at 2:07 pm
    import numpy as np
    import scipy as sp
    import matplotlib.pyplot as plt
    from PIL import Image
    import os
    
  883. Install fftw said, on March 2, 2013 at 12:08 pm

    Config to have fftw3f.pc and shared libraries:

    ./configure --prefix=${HOME}/opt/fftw  --enable-float --enable-shared
    

    To fix fftw3f-not-found error:

    ls /usr/local/lib/pkgconfig
    

    should list fftw3f.pc among the known packages.

    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --list-all
    

    should also list fftw3f.pc among the known packages.

     echo $PKG_CONFIG_PATH
    

    should show that PKG_CONFIG_PATH is not defined. If it is defined as
    anything other than /usr/local/lib/pkgconfig then it’s a problem;
    reset it with by

    PKG_CONFIG_PATH=
    

    Link: http://www.ruby-forum.com/topic/126917

  884. Write line to file in Python said, on March 2, 2013 at 12:28 pm
    with open('FileName', 'w') as f:
                f.write('contents')
    

    From docs.python.org:

    It is good practice to use the with keyword when dealing with file objects. This has the advantage that the file is properly closed after its suite finishes, even if an exception is raised on the way. It is also much shorter than writing equivalent try-finally blocks.

    Read more: http://stackoverflow.com/questions/6159900/correct-way-to-write-line-to-file-in-python

  885. Copy a file in Python said, on March 2, 2013 at 1:21 pm

    Simple: use os.system

    
    import os
    import tempfile
    
    filename1 = tempfile.mktemp (".txt")
    open (filename1, "w").close ()
    filename2 = filename1 + ".copy"
    print filename1, "=>", filename2
    
    os.system ("copy %s %s" % (filename1, filename2))
    
    if os.path.isfile (filename2): print "Success"
    
    dirname1 = tempfile.mktemp (".dir")
    os.mkdir (dirname1)
    dirname2 = dirname1 + ".copy"
    print dirname1, "=>", dirname2
    
    os.system ("xcopy /s %s %s" % (dirname1, dirname2))
    
    if os.path.isdir (dirname2): print "Success"
    

    Read more: http://timgolden.me.uk/python/win32_how_do_i/copy-a-file.html

  886. Elegant way to check if the directory a file is going to be written to exists said, on March 2, 2013 at 1:24 pm
    try: 
        os.makedirs(path)
    except OSError:
        if not os.path.isdir(path):
            raise
    

    Read more: http://stackoverflow.com/questions/273192/python-best-way-to-create-directory-if-it-doesnt-exist-for-file-write

  887. CGAL- Compile an example said, on March 2, 2013 at 7:20 pm
    rm -f ./CMakeCache.txt 
    cmake -DCGAL_DIR=/usr/include/CGAL
    make 
    
  888. Anonymous said, on March 2, 2013 at 10:06 pm

    “Three components make an entrepreneur: the person, the idea, and the resources to make it happen.”
    – Anita Roddick, Body Shop founder

  889. Anonymous said, on March 2, 2013 at 10:07 pm

    “Fortune favors the audacious.”– Desiderius Erasmus, Theologian

  890. ToString said, on March 4, 2013 at 4:40 pm
    
    template <typename T>
      string ToString ( T Number )
      {
         ostringstream ss;
         ss << Number;
         return ss.str();
      }
    
    
  891. Anonymous said, on March 5, 2013 at 8:20 pm

    “The one word that makes a good manager – decisiveness.”– Lee Iacocca, Auto Executive

  892. admesh said, on March 5, 2013 at 9:56 pm

    Check stl mesh:

    admesh -fundev sphere.stl
    

    Fix stl mesh:

    admesh -fundev sphere.stl -a out.stl
    

    *Mesh Checking and Repairing Options*
    -e, –exact Only check for perfectly matched edges
    -n, –nearby Find and connect nearby facets. Correct bad facets
    -t, –tolerance=tol Initial tolerance to use for nearby check = tol
    -i, –iterations=i Number of iterations for nearby check = i
    -m, –increment=inc Amount to increment tolerance after iteration=inc
    -u, –remove-unconnected Remove facets that have 0 neighbors
    -f, –fill-holes Add facets to fill holes
    -d, –normal-directions Check and fix direction of normals(ie cw, ccw)
    –reverse-all Reverse the directions of all facets and normals
    -v, –normal-values Check and fix normal values
    -c, –no-check Don’t do any check on input file

  893. Anonymous said, on March 6, 2013 at 4:51 pm
    
    double Random(double min, double max) {
        timeval t1;
        gettimeofday(&t1, NULL);
        srand(t1.tv_usec * t1.tv_sec);
        double random = ((double) rand()) / (double) RAND_MAX;
        double range = max - min;
        random= min+random*range;
        return random;
    }
    
    double PointLineDistance(const vec3& P, const vec3& M, const vec3& N) {
        vec3 MP = P-M;
        vec3 MN = N-M;
        double dist = (MN^MP).length()/MN.length();
        return dist;
    };
    
    
  894. Anonymous said, on March 7, 2013 at 10:16 am

    “It doesn’t matter if you are rich, poor, or in between, fully 85 percent of what you accomplish – in your career and your personal life – will be determined by how well you get your message across and by how capable you are of inspiring people to take action on your ideas and recommendations.”–Brian Tracy

  895. Anonymous said, on March 7, 2013 at 10:26 am

    “Go confidently in the direction of your dreams! Live the life you’ve imagined. As you simplify your life, the laws of the universe will be simpler.”–Henry David Thoreau

  896. Anonymous said, on March 7, 2013 at 10:59 am

    “Gratitude is not only the greatest of virtues, but also the parent of all the others.”– Cicero, Philosopher

  897. StarDict said, on March 8, 2013 at 10:51 am

    The original StarDict project has recently been removed from SourceForge due to copyright infringement reports. Most of the files were lost with the demise of the project. The project has re-emerged here since then, though the legal issues may never have been resolved.

    StarDict hasn’t seen any active development for many years, while the world around hasn’t stood still. The following is the list of alternatives appeared during that time. You are advised to take a look and try them:

    GoldenDict – designed as a StarDict successor, it supports its format, lots of other formats (Lingvo, Babylon etc), features tabbed browsing, morphology, live pronunciations, Wikipedia and so on. The program is constantly being improved and worked on.
    Babiloo – a free open source software developed to read offline dictionaries. Runs on most platforms. Supports StarDict and SDictionary formats.
    LightLang – another system of electronic dictionaries (Linux only).
    Some other free, but closed-source programs:
    Lingoes – fast and lean, but Windows only, and supports only its own format.
    Dicto – supports XDXF dictionaries. Windows only. Appears to be Russian-oriented.

    link: http://stardict.sourceforge.net/

  898. Why Code in C Anymore? said, on March 8, 2013 at 3:25 pm

    C remains an excellent choice for systems-level code: It’s fast, it’s portable, it’s easy to read and understand. For applications, though, where the emphasis is more on development productivity, it’s clear that C++ will continue to dominate native languages and likely expand its footprint.

    Read more: http://www.drdobbs.com/cpp/why-code-in-c-anymore/240149452

  899. The Python Tutorial said, on March 8, 2013 at 3:55 pm

    The Glossary is also worth going through.

    1. Whetting Your Appetite
    2. Using the Python Interpreter
    2.1. Invoking the Interpreter
    2.1.1. Argument Passing
    2.1.2. Interactive Mode
    2.2. The Interpreter and Its Environment
    2.2.1. Error Handling
    2.2.2. Executable Python Scripts
    2.2.3. Source Code Encoding
    2.2.4. The Interactive Startup File
    2.2.5. The Customization Modules
    3. An Informal Introduction to Python
    3.1. Using Python as a Calculator
    3.1.1. Numbers
    3.1.2. Strings
    3.1.3. Unicode Strings
    3.1.4. Lists
    3.2. First Steps Towards Programming
    4. More Control Flow Tools
    4.1. if Statements
    4.2. for Statements
    4.3. The range() Function
    4.4. break and continue Statements, and else Clauses on Loops
    4.5. pass Statements
    4.6. Defining Functions
    4.7. More on Defining Functions
    4.7.1. Default Argument Values
    4.7.2. Keyword Arguments
    4.7.3. Arbitrary Argument Lists
    4.7.4. Unpacking Argument Lists
    4.7.5. Lambda Forms
    4.7.6. Documentation Strings
    4.8. Intermezzo: Coding Style
    5. Data Structures
    5.1. More on Lists
    5.1.1. Using Lists as Stacks
    5.1.2. Using Lists as Queues
    5.1.3. Functional Programming Tools
    5.1.4. List Comprehensions
    5.1.4.1. Nested List Comprehensions
    5.2. The del statement
    5.3. Tuples and Sequences
    5.4. Sets
    5.5. Dictionaries
    5.6. Looping Techniques
    5.7. More on Conditions
    5.8. Comparing Sequences and Other Types
    6. Modules
    6.1. More on Modules
    6.1.1. Executing modules as scripts
    6.1.2. The Module Search Path
    6.1.3. “Compiled” Python files
    6.2. Standard Modules
    6.3. The dir() Function
    6.4. Packages
    6.4.1. Importing * From a Package
    6.4.2. Intra-package References
    6.4.3. Packages in Multiple Directories
    7. Input and Output
    7.1. Fancier Output Formatting
    7.1.1. Old string formatting
    7.2. Reading and Writing Files
    7.2.1. Methods of File Objects
    7.2.2. The pickle Module
    8. Errors and Exceptions
    8.1. Syntax Errors
    8.2. Exceptions
    8.3. Handling Exceptions
    8.4. Raising Exceptions
    8.5. User-defined Exceptions
    8.6. Defining Clean-up Actions
    8.7. Predefined Clean-up Actions
    9. Classes
    9.1. A Word About Names and Objects
    9.2. Python Scopes and Namespaces
    9.3. A First Look at Classes
    9.3.1. Class Definition Syntax
    9.3.2. Class Objects
    9.3.3. Instance Objects
    9.3.4. Method Objects
    9.4. Random Remarks
    9.5. Inheritance
    9.5.1. Multiple Inheritance
    9.6. Private Variables and Class-local References
    9.7. Odds and Ends
    9.8. Exceptions Are Classes Too
    9.9. Iterators
    9.10. Generators
    9.11. Generator Expressions
    10. Brief Tour of the Standard Library
    10.1. Operating System Interface
    10.2. File Wildcards
    10.3. Command Line Arguments
    10.4. Error Output Redirection and Program Termination
    10.5. String Pattern Matching
    10.6. Mathematics
    10.7. Internet Access
    10.8. Dates and Times
    10.9. Data Compression
    10.10. Performance Measurement
    10.11. Quality Control
    10.12. Batteries Included
    11. Brief Tour of the Standard Library – Part II
    11.1. Output Formatting
    11.2. Templating
    11.3. Working with Binary Data Record Layouts
    11.4. Multi-threading
    11.5. Logging
    11.6. Weak References
    11.7. Tools for Working with Lists
    11.8. Decimal Floating Point Arithmetic
    12. What Now?
    13. Interactive Input Editing and History Substitution
    13.1. Line Editing
    13.2. History Substitution
    13.3. Key Bindings
    13.4. Alternatives to the Interactive Interpreter
    14. Floating Point Arithmetic: Issues and Limitations
    14.1. Representation Error

    Read more: http://docs.python.org/2/tutorial/

  900. The Best Way to Learn Python said, on March 8, 2013 at 4:05 pm

    Project Euler (pronounced ‘Oil-er’, to save you some embarrassment later on) is one of my favorite websites. After making an account, you can work through the ~400 problems on the website. Each problem is about 50% mathematics and 50% programming and, in my opinion, the most rewarding way to learn more of either subject.
    The problems start off easy to test your knowledge of the language, but grow in difficulty to challenge even the most seasoned programmers. Eventually, the difficulty of the problems will force you to find the most efficient algorithm – that is if you don’t want to wait hours to compute the answer.

    Think Python: How to Think Like a Computer Scientist
    You won’t find a better source of information than the official python.org documentation.
    As the sub title might suggest, “How to think like a computer scientist”, Think Python stays a little more towards the theoretical side of things. This may prove a little frustrating for a total beginner, but the book is well worth the read in regards to algorithm theory and high level concepts.

    Read more: http://net.tutsplus.com/tutorials/the-best-way-to-learn-python/

  901. Think Python: How to Think Like a Computer Scientist said, on March 8, 2013 at 4:08 pm

    Preface
    The strange history of this book
    Acknowledgments
    Contributor List
    The way of the program
    The Python programming language
    What is a program?
    What is debugging?
    Formal and natural languages
    The first program
    Debugging
    Glossary
    Exercises
    Variables, expressions and statements
    Values and types
    Variables
    Variable names and keywords
    Operators and operands
    Expressions and statements
    Interactive mode and script mode
    Order of operations
    String operations
    Comments
    Debugging
    Glossary
    Exercises
    Functions
    Function calls
    Type conversion functions
    Math functions
    Composition
    Adding new functions
    Definitions and uses
    Flow of execution
    Parameters and arguments
    Variables and parameters are local
    Stack diagrams
    Fruitful functions and void functions
    Why functions?
    Importing with from
    Debugging
    Glossary
    Exercises
    Case study: interface design
    TurtleWorld
    Simple repetition
    Exercises
    Encapsulation
    Generalization
    Interface design
    Refactoring
    A development plan
    docstring
    Debugging
    Glossary
    Exercises
    Conditionals and recursion
    Modulus operator
    Boolean expressions
    Logical operators
    Conditional execution
    Alternative execution
    Chained conditionals
    Nested conditionals
    Recursion
    Stack diagrams for recursive functions
    Infinite recursion
    Keyboard input
    Debugging
    Glossary
    Exercises
    Fruitful functions
    Return values
    Incremental development
    Composition
    Boolean functions
    More recursion
    Leap of faith
    One more example
    Checking types
    Debugging
    Glossary
    Exercises
    Iteration
    Multiple assignment
    Updating variables
    The while statement
    break
    Square roots
    Algorithms
    Debugging
    Glossary
    Exercises
    Strings
    A string is a sequence
    len
    Traversal with a for loop
    String slices
    Strings are immutable
    Searching
    Looping and counting
    String methods
    The in operator
    String comparison
    Debugging
    Glossary
    Exercises
    Case study: word play
    Reading word lists
    Exercises
    Search
    Looping with indices
    Debugging
    Glossary
    Exercises
    Lists
    A list is a sequence
    Lists are mutable
    Traversing a list
    List operations
    List slices
    List methods
    Map, filter and reduce
    Deleting elements
    Lists and strings
    Objects and values
    Aliasing
    List arguments
    Debugging
    Glossary
    Exercises
    Dictionaries
    Dictionary as a set of counters
    Looping and dictionaries
    Reverse lookup
    Dictionaries and lists
    Memos
    Global variables
    Long integers
    Debugging
    Glossary
    Exercises
    Tuples
    Tuples are immutable
    Tuple assignment
    Tuples as return values
    Variable-length argument tuples
    Lists and tuples
    Dictionaries and tuples
    Comparing tuples
    Sequences of sequences
    Debugging
    Glossary
    Exercises
    Case study: data structure selection
    Word frequency analysis
    Random numbers
    Word histogram
    Most common words
    Optional parameters
    Dictionary subtraction
    Random words
    Markov analysis
    Data structures
    Debugging
    Glossary
    Exercises
    Files
    Persistence
    Reading and writing
    Format operator
    Filenames and paths
    Catching exceptions
    Databases
    Pickling
    Pipes
    Writing modules
    Debugging
    Glossary
    Exercises
    Classes and objects
    User-defined types
    Attributes
    Rectangles
    Instances as return values
    Objects are mutable
    Copying
    Debugging
    Glossary
    Exercises
    Classes and functions
    Time
    Pure functions
    Modifiers
    Prototyping versus planning
    Debugging
    Glossary
    Exercises
    Classes and methods
    Object-oriented features
    Printing objects
    Another example
    A more complicated example
    The init method
    The __str__ method
    Operator overloading
    Type-based dispatch
    Polymorphism
    Debugging
    Interface and implementation
    Glossary
    Exercises
    Inheritance
    Card objects
    Class attributes
    Comparing cards
    Decks
    Printing the deck
    Add, remove, shuffle and sort
    Inheritance
    Class diagrams
    Debugging
    Data encapsulation
    Glossary
    Exercises
    Case study: Tkinter
    GUI
    Buttons and callbacks
    Canvas widgets
    Coordinate sequences
    More widgets
    Packing widgets
    Menus and Callables
    Binding
    Debugging
    Glossary
    Exercises
    Debugging
    Syntax errors
    Runtime errors
    Semantic errors
    Analysis of Algorithms
    Order of growth
    Analysis of basic Python operations
    Analysis of search algorithms
    Hashtables
    Lumpy
    State diagram
    Stack diagram
    Object diagrams
    Function and class objects
    Class Diagrams
    Index

    Read more: http://www.greenteapress.com/thinkpython/html/index.html

  902. The NAG C Library said, on March 8, 2013 at 4:42 pm

    Key Features
    Optimization – local and global optimization solvers
    Ordinary and partial differential equations
    Wavelet transforms
    Option pricing
    Partial least squares and ridge regression
    Nearest correlation matrix
    Quantiles
    Mesh generation
    Numerical integration
    Roots of nonlinear equations (including polynomials)
    Dense, banded and sparse linear equations
    Eigenvalue problems
    Linear and nonlinear least squares problems
    Special functions
    Curve and surface fitting and interpolation
    Large scale eigenproblems
    Large, sparse systems of linear equations
    Random number generation
    Simple calculations of statistical data
    Correlation and regression analysis
    Multivariate methods
    Analysis of variance and contingency table analysis
    Time series analysis
    Nonparametric statistics
    Copulas
    Mixed effects regression
    Stepwise linear regression

    Read more: http://www.nag.co.uk/numeric/CL/CLdescription.asp

  903. Graphite said, on March 8, 2013 at 4:44 pm

    Graphite is a research platform for computer graphics, 3D modeling and numerical geometry.
    Graphite was awarded the special prize “most innovative project” and the third prize “scientific software category” at the “trophées du libre” international free software competition.

    Read more: http://alice.loria.fr/index.php/software/3-platform/22-graphite.html

  904. meshconv said, on March 8, 2013 at 8:17 pm

    meshconv converts to and from several popular 3D file formats. Currently only geometry conversion is supported.
    Features

    input and output formats:
    nearly 100% VRML 2.0 support (input 2.0, output 1.0 and 2.0)
    simple geometry only support for Wavefront OBJ, Geomview OFF, Autocad DXF, PLY and STL

    link: http://www.cs.princeton.edu/~min/meshconv/

  905. OBJ File Format Parsing in Python said, on March 8, 2013 at 8:30 pm
    #do the loading of the obj file
    def load_obj(filename) :
     V = [] #vertex
     T = [] #texcoords
     N = [] #normals
     F = [] #face indexies
    
     fh = open(filename)
     for line in fh :
      if line[0] == '#' : continue
     
      line = line.strip().split(' ')
      if line[0] == 'v' : #vertex
       V.append(line[1:])
      elif line[0] == 'vt' : #tex-coord
       T.append(line[1:])
      elif line[0] == 'vn' : #normal vector
       N.append(line[1:])
      elif line[0] == 'f' : #face
       face = line[1:]
       if len(face) != 4 : 
        print line
        #raise Exception('not a quad!')
        continue
       for i in range(0, len(face)) :
        face[i] = face[i].split('/')
        # OBJ indexies are 1 based not 0 based hence the -1
        # convert indexies to integer
        for j in range(0, len(face[i])) : face[i][j] = int(face[i][j]) - 1
       F.append(face)
    
     return V, T, N, F
    
    

    Read more: http://programminglinuxgames.blogspot.jp/2010/09/parsing-wavefront-obj-file-format-using.html

  906. Convert m to vtk triangle mesh said, on March 8, 2013 at 10:05 pm
    #!/usr/bin/python
    # coding: UTF-8
    import csv
    
    def load_m(filename) :
    	V = [] #vertex
    	F = [] #face indexies
    	fh = open(filename,'r')
    	lines=fh.readlines()
    	fh.close()
    	for line in lines :
    		line = line.split()
    		if line[0] == 'Vertex':
    			V.append(line[2:])
    		elif line[0] == 'Face':
    			F.append(line[2:])
    	return V , F
    
    f="outmesh.m"
    Points,Cells=load_m(f)
    
    nPoints = len(Points)
    nCells = len(Cells) 
    
    # read line into array
    cellArr=[]
    for cell in Cells:
    	line = [3] # triangle 
    	for i in range(len(cell)):
    		line.append(int(cell[i])-1) #node index begins from 0
    	cellArr.append(line)
    
    # create celltype array
    celltypeArr = []
    for i in range(nCells):
    	celltypeArr.append([5]) # triangle cell type
    
    # write out vtk file
    vtkFile = "TriangleMesh.vtk"
    fout = open(vtkFile,"w")
    w = csv.writer(fout, dialect = 'excel-tab')
    header=[['# vtk DataFile Version 3.1'], [], ['ASCII'], ['DATASET UNSTRUCTURED_GRID']]
    point=[["POINTS",nPoints,"FLOAT"]]
    cell=[["CELLS",nCells,nCells*4]]
    celltype=[["CELL_TYPES",nCells]]
    w.writerows(header)
    w.writerows(point)
    w.writerows(Points)
    w.writerows(cell)
    w.writerows(cellArr)
    w.writerows(celltype)
    w.writerows(celltypeArr)
    fout.close()
    
  907. Robust algorithm for surface reconstruction from 3D point cloud said, on March 8, 2013 at 11:04 pm

    Mainly there are 2 categories of algorithms: computation geometry, and implicit surfaces.

    Computation Geometry

    They fit the mesh on the existing points.

    Probably the most famous algorithm of this group is powercrust, because it is theoretically well-established – it guarantees watertight mesh.

    Ball Pivoting is patented by IBM. Also, it is not suitable for pointclouds with varying point density.

    Implicit functions

    One fits implicit functions on the pointcloud, then uses a marching-cube-like algorithm to extract the zero-set of the function into a mesh.

    Methods in this category differ mainly by the different implicit functions used.

    Poisson, Hoppe’s, and MPU are the most famous algorithms in this category. If you are new to the topic, i recommend to read Hoppe’s thesis, it is very explanatory.

    The algorithms of this category usually can be implemented so that they are able to process huge inputs very efficiently, and one can scale their qualityspeed trade-off. They are not disturbed by noise, varying point-density, holes. A disadvantage of them is that they require consistently oriented surface normals at the input points.

    Read more: http://stackoverflow.com/questions/838761/robust-algorithm-for-surface-reconstruction-from-3d-point-cloud

  908. deprecated_point3.h said, on March 9, 2013 at 12:01 am
    
    /****************************************************************************
    * VCGLib                                                            o o     *
    * Visual and Computer Graphics Library                            o     o   *
    *                                                                _   O  _   *
    * Copyright(C) 2004                                                \/)\/    *
    * Visual Computing Lab                                            /\/|      *
    * ISTI - Italian National Research Council                           |      *
    *                                                                    \      *
    * All rights reserved.                                                      *
    *                                                                           *
    * This program is free software; you can redistribute it and/or modify      *   
    * it under the terms of the GNU General Public License as published by      *
    * the Free Software Foundation; either version 2 of the License, or         *
    * (at your option) any later version.                                       *
    *                                                                           *
    * This program is distributed in the hope that it will be useful,           *
    * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
    * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
    * for more details.                                                         *
    *                                                                           *
    ****************************************************************************/
    
    
    #ifndef __VCGLIB_POINT3
    #define __VCGLIB_POINT3
    
    #include <assert.h>
    #include <algorithm>
    #include <vcg/math/base.h>
    
    namespace vcg {
    
    /** \addtogroup space */
    /*@{*/
        /**
            The templated class for representing a point in 3D space.
            The class is templated over the ScalarType class that is used to represent coordinates. All the usual
            operator overloading (* + - ...) is present. 
         */
    template <class T> class Box3;
    
    template <class P3ScalarType> class Point3
    {
    protected:
      /// The only data member. Hidden to user.
    	P3ScalarType _v[3];
    
    public:
    	typedef P3ScalarType ScalarType;
    	enum {Dimension = 3};
    	
    	
    //@{
    
      /** @name Standard Constructors and Initializers 
       No casting operators have been introduced to avoid automatic unattended (and costly) conversion between different point types
       **/
    
      inline Point3 () { }
    	inline Point3 ( const P3ScalarType nx, const P3ScalarType ny, const P3ScalarType nz )
    	{
    		_v[0] = nx;
    		_v[1] = ny;
    		_v[2] = nz;
    	}
    	inline Point3 ( Point3 const & p )
    	{   
    		_v[0]= p._v[0];
    		_v[1]= p._v[1];
    		_v[2]= p._v[2];
    	}
    	inline Point3 ( const P3ScalarType nv[3] )
    	{
    		_v[0] = nv[0];
    		_v[1] = nv[1];
    		_v[2] = nv[2];
    	}
    	inline Point3 & operator =( Point3 const & p )
    	{
    			_v[0]= p._v[0]; _v[1]= p._v[1]; _v[2]= p._v[2];
    			return *this;
    	}
    	inline void SetZero()
    	{
    		_v[0] = 0;
    		_v[1] = 0;
    		_v[2] = 0;
    	}
      
      /// Padding function: give a default 0 value to all the elements that are not in the [0..2] range. 
      /// Useful for managing in a consistent way object that could have point2 / point3 / point4
    	inline P3ScalarType Ext( const int i ) const
    	{
    		if(i>=0 && i<=2) return _v[i];
    		else             return 0;
    	}
    
    	template <class Q>
    	inline void Import( const Point3<Q> & b )
    	{
    		_v[0] = P3ScalarType(b[0]);
    		_v[1] = P3ScalarType(b[1]);
    		_v[2] = P3ScalarType(b[2]);
    	}
    
      template <class Q> 
      static inline Point3 Construct( const Point3<Q> & b )
      {
        return Point3(P3ScalarType(b[0]),P3ScalarType(b[1]),P3ScalarType(b[2]));
      }
    
      template <class Q> 
      static inline Point3 Construct( const Q & P0, const Q & P1, const Q & P2)
      {
        return Point3(P3ScalarType(P0),P3ScalarType(P1),P3ScalarType(P2));
      }
    
      static inline Point3 Construct( const Point3<ScalarType> & b )
      {
        return b;
      }
    
    //@}
    
    //@{
    
      /** @name Data Access. 
       access to data is done by overloading of [] or explicit naming of coords (x,y,z)**/
    
    	inline P3ScalarType & operator [] ( const int i )
    	{
    		assert(i>=0 && i<3);
    		return _v[i];
    	}
    	inline const P3ScalarType & operator [] ( const int i ) const
    	{
    		assert(i>=0 && i<3);
    		return _v[i];
    	}
      inline const P3ScalarType &X() const { return _v[0]; } 
    	inline const P3ScalarType &Y() const { return _v[1]; }
    	inline const P3ScalarType &Z() const { return _v[2]; }
    	inline P3ScalarType &X() { return _v[0]; }
    	inline P3ScalarType &Y() { return _v[1]; }
    	inline P3ScalarType &Z() { return _v[2]; }
    	inline const P3ScalarType * V() const
    	{
    		return _v;
    	}
    	inline P3ScalarType * V()
    	{
    		return _v;
    	}
    	inline P3ScalarType & V( const int i )
    	{
    		assert(i>=0 && i<3);
    		return _v[i];
    	}
    	inline const P3ScalarType & V( const int i ) const
    	{
    		assert(i>=0 && i<3);
    		return _v[i];
    	}
    //@}
    //@{
    
      /** @name Classical overloading of operators 
      Note   
      **/
    
    	inline Point3 operator + ( Point3 const & p) const
    	{
    		return Point3<P3ScalarType>( _v[0]+p._v[0], _v[1]+p._v[1], _v[2]+p._v[2] );
    	}
    	inline Point3 operator - ( Point3 const & p) const
    	{
    		return Point3<P3ScalarType>( _v[0]-p._v[0], _v[1]-p._v[1], _v[2]-p._v[2] );
    	}
    	inline Point3 operator * ( const P3ScalarType s ) const
    	{
    		return Point3<P3ScalarType>( _v[0]*s, _v[1]*s, _v[2]*s );
    	}
    	inline Point3 operator / ( const P3ScalarType s ) const
    	{
    		return Point3<P3ScalarType>( _v[0]/s, _v[1]/s, _v[2]/s );
    	}
    		/// Dot product
    	inline P3ScalarType operator * ( Point3 const & p ) const
    	{
    		return ( _v[0]*p._v[0] + _v[1]*p._v[1] + _v[2]*p._v[2] );
    	}
    	inline P3ScalarType dot( const Point3 & p ) const { return (*this) * p; }
    		/// Cross product
    	inline Point3 operator ^ ( Point3 const & p ) const
    	{
    		return Point3 <P3ScalarType>
    		(
    			_v[1]*p._v[2] - _v[2]*p._v[1],
    			_v[2]*p._v[0] - _v[0]*p._v[2],
    			_v[0]*p._v[1] - _v[1]*p._v[0]
    		);
    	}
    
    	inline Point3 & operator += ( Point3 const & p)
    	{
    		_v[0] += p._v[0];
    		_v[1] += p._v[1];
    		_v[2] += p._v[2];
    		return *this;
    	}
    	inline Point3 & operator -= ( Point3 const & p)
    	{
    		_v[0] -= p._v[0];
    		_v[1] -= p._v[1];
    		_v[2] -= p._v[2];
    		return *this;
    	}
    	inline Point3 & operator *= ( const P3ScalarType s )
    	{
    		_v[0] *= s;
    		_v[1] *= s;
    		_v[2] *= s;
    		return *this;
    	}
    	inline Point3 & operator /= ( const P3ScalarType s )
    	{
    		_v[0] /= s;
    		_v[1] /= s;
    		_v[2] /= s;
    		return *this;
    	}
    		// Norme
    	inline P3ScalarType Norm() const
    	{
        return math::Sqrt( _v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2] );
    	}
    	inline P3ScalarType SquaredNorm() const
    	{
    		return ( _v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2] );
    	}
    		// Scalatura differenziata
    	inline Point3 & Scale( const P3ScalarType sx, const P3ScalarType sy, const P3ScalarType sz )
    	{
    		_v[0] *= sx;
    		_v[1] *= sy;
    		_v[2] *= sz;
    		return *this;
    	}
    	inline Point3 & Scale( const Point3 & p )
    	{
    		_v[0] *= p._v[0];
    		_v[1] *= p._v[1];
    		_v[2] *= p._v[2];
    		return *this;
    	}
    
    	// Normalizzazione
    	inline Point3 & Normalize()
    	{
    		P3ScalarType n = P3ScalarType(math::Sqrt(_v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2]));
    		if (n > P3ScalarType(0)) { _v[0] /= n; _v[1] /= n; _v[2] /= n; }
    		return *this;
    	}
    
    	// for compatibility with eigen port
    	inline Point3 & normalized() { return Normalize(); } 
    	
    	/** 
    	 * Convert to polar coordinates from cartesian coordinates.
    	 *
    	 * Theta is the azimuth angle and ranges between [0, 2PI) degrees.
    	 * Phi is the elevation angle (not the polar angle) and ranges between [-PI/2, PI/2] degrees.
    	 *
    	 * /note Note that instead of the classical polar angle, which ranges between 
    	 *       0 and PI degrees we opt for the elevation angle to obtain a more 
    	 *       intuitive spherical coordinate system.
    	 */
    	void ToPolarRad(P3ScalarType &ro, P3ScalarType &theta, P3ScalarType &phi) const
    	{
    		ro = Norm();
    		theta = (P3ScalarType)atan2(_v[2], _v[0]);
    		phi   = (P3ScalarType)asin(_v[1]/ro);
    	}
    
    	/**
    	 * Convert from polar coordinates to cartesian coordinates.
    	 *
    	 * Theta is the azimuth angle and ranges between [0, 2PI) radians.
    	 * Phi is the elevation angle (not the polar angle) and ranges between [-PI/2, PI/2] radians.
    	 *
    	 * \note Note that instead of the classical polar angle, which ranges between 
    	 *       0 and PI degrees, we opt for the elevation angle to obtain a more 
    	 *       intuitive spherical coordinate system.
    	 */
      void FromPolarRad(const P3ScalarType &ro, const P3ScalarType &theta, const P3ScalarType &phi)
    	{
        _v[0]= ro*cos(theta)*cos(phi);
        _v[1]= ro*sin(phi);
        _v[2]= ro*sin(theta)*cos(phi);
    	}
    	
      Box3<P3ScalarType> GetBBox(Box3<P3ScalarType> &bb) const;
    //@}
    //@{
    
      /** @name Comparison Operators. 
       Note that the reverse z prioritized ordering, useful in many situations.
       **/
    
    inline bool operator == ( Point3 const & p ) const
    	{
    		return _v[0]==p._v[0] && _v[1]==p._v[1] && _v[2]==p._v[2];
    	}
    	inline bool operator != ( Point3 const & p ) const
    	{
    		return _v[0]!=p._v[0] || _v[1]!=p._v[1] || _v[2]!=p._v[2];
    	}
    	inline bool operator <  ( Point3 const & p ) const
    	{
    		return	(_v[2]!=p._v[2])?(_v[2]<p._v[2]):
    				(_v[1]!=p._v[1])?(_v[1]<p._v[1]):
    						       (_v[0]<p._v[0]);
    	}
    	inline bool operator >  ( Point3 const & p ) const
    	{
    		return	(_v[2]!=p._v[2])?(_v[2]>p._v[2]):
    				(_v[1]!=p._v[1])?(_v[1]>p._v[1]):
    							   (_v[0]>p._v[0]);
    	}
    	inline bool operator <= ( Point3 const & p ) const
    	{
    		return	(_v[2]!=p._v[2])?(_v[2]< p._v[2]):
    				(_v[1]!=p._v[1])?(_v[1]< p._v[1]):
    							   (_v[0]<=p._v[0]);
    	}
    	inline bool operator >= ( Point3 const & p ) const
    	{
    		return	(_v[2]!=p._v[2])?(_v[2]> p._v[2]):
    				(_v[1]!=p._v[1])?(_v[1]> p._v[1]):
    							   (_v[0]>=p._v[0]);
    	}
    
    	
    	inline Point3 operator - () const
    	{
    		return Point3<P3ScalarType> ( -_v[0], -_v[1], -_v[2] );
    	}
     //@}
    
    }; // end class definition
    
    
    template <class P3ScalarType>
    inline P3ScalarType Angle( Point3<P3ScalarType> const & p1, Point3<P3ScalarType> const & p2 )
    {
    	P3ScalarType w = p1.Norm()*p2.Norm();
    	if(w==0) return -1;
    	P3ScalarType t = (p1*p2)/w;
    	if(t>1) t = 1;
    	else if(t<-1) t = -1;
        return (P3ScalarType) acos(t);
    }
    
    // versione uguale alla precedente ma che assume che i due vettori sono unitari
    template <class P3ScalarType>
    inline P3ScalarType AngleN( Point3<P3ScalarType> const & p1, Point3<P3ScalarType> const & p2 )
    {
    	P3ScalarType w = p1*p2;
    	if(w>1) 
    		w = 1;
    	else if(w<-1) 
    		w=-1;
      return (P3ScalarType) acos(w);
    }
    
    
    template <class P3ScalarType>
    inline P3ScalarType Norm( Point3<P3ScalarType> const & p )
    {
    	return p.Norm();
    }
    
    template <class P3ScalarType>
    inline P3ScalarType SquaredNorm( Point3<P3ScalarType> const & p )
    {
        return p.SquaredNorm();
    }
    
    template <class P3ScalarType>
    inline Point3<P3ScalarType> & Normalize( Point3<P3ScalarType> & p )
    {
        p.Normalize();
        return p;
    }
    
    template <class P3ScalarType>
    inline P3ScalarType Distance( Point3<P3ScalarType> const & p1,Point3<P3ScalarType> const & p2 )
    {
        return (p1-p2).Norm();
    }
    
    template <class P3ScalarType>
    inline P3ScalarType SquaredDistance( Point3<P3ScalarType> const & p1,Point3<P3ScalarType> const & p2 )
    {
        return (p1-p2).SquaredNorm();
    }
    
    template <class P3ScalarType>
    P3ScalarType ApproximateGeodesicDistance(const Point3<P3ScalarType>& p0, const Point3<P3ScalarType>& n0,
                                           const Point3<P3ScalarType>& p1, const Point3<P3ScalarType>& n1)
    {
        Point3<P3ScalarType> V(p0-p1);
        V.Normalize();
        const P3ScalarType C0 = V*n0;
        const P3ScalarType C1 = V*n1;
        const P3ScalarType De = Distance(p0,p1);
        if(fabs(C0-C1)<0.0001) return De/sqrt(1-C0*C1);
        const P3ScalarType Dg = ((asin(C0) - asin(C1))/(C0-C1));
        return Dg*De;
    }
    
    
    	// Dot product preciso numericamente (solo double!!)
    	// Implementazione: si sommano i prodotti per ordine di esponente
    	// (prima le piu' grandi)
    template<class P3ScalarType>
    double stable_dot ( Point3<P3ScalarType> const & p0, Point3<P3ScalarType> const & p1 )
    {
    	P3ScalarType k0 = p0._v[0]*p1._v[0];
    	P3ScalarType k1 = p0._v[1]*p1._v[1];
    	P3ScalarType k2 = p0._v[2]*p1._v[2];
    
    	int exp0,exp1,exp2;
    
    	frexp( double(k0), &exp0 );
    	frexp( double(k1), &exp1 );
    	frexp( double(k2), &exp2 );
    
    	if( exp0<exp1 )
    	{
    		if(exp0<exp2)
    			return (k1+k2)+k0;
    		else
    			return (k0+k1)+k2;
    	}
    	else
    	{
    		if(exp1<exp2)
    			return(k0+k2)+k1;
    		else
    			return (k0+k1)+k2;
    	}
    }  
    
    
    
    /// Point(p) Edge(v1-v2) dist, q is the point in v1-v2 with min dist
    template<class P3ScalarType>
    P3ScalarType PSDist( const Point3<P3ScalarType> & p,
    			         const Point3<P3ScalarType> & v1,
    					 const Point3<P3ScalarType> & v2,
    			         Point3<P3ScalarType> & q )
    {
        Point3<P3ScalarType> e = v2-v1;
        P3ScalarType  t = ((p-v1)*e)/e.SquaredNorm();
        if(t<0)      t = 0;
    	else if(t>1) t = 1;
    	q = v1+e*t;
        return Distance(p,q);
    }
    
    
    template <class P3ScalarType>
    void GetUV( Point3<P3ScalarType> &n,Point3<P3ScalarType> &u, Point3<P3ScalarType> &v, Point3<P3ScalarType> up=(Point3<P3ScalarType>(0,1,0)) )
    {
    	n.Normalize();
    	const double LocEps=double(1e-7);
    	u=n^up;
      double len = u.Norm();
     	if(len < LocEps)
    	{
    		if(fabs(n[0])<fabs(n[1])){
    			if(fabs(n[0])<fabs(n[2])) up=Point3<P3ScalarType>(1,0,0); // x is the min 
    			                         else up=Point3<P3ScalarType>(0,0,1); // z is the min 
    		}else {
    			if(fabs(n[1])<fabs(n[2])) up=Point3<P3ScalarType>(0,1,0); // y is the min 
    			                         else up=Point3<P3ScalarType>(0,0,1); // z is the min 
    		}
    		u=n^up;
    	}
    	u.Normalize();
    	v=n^u;
    	v.Normalize();
    	Point3<P3ScalarType> uv=u^v;
    }
    
    
    template <class SCALARTYPE>
    inline Point3<SCALARTYPE> Abs(const Point3<SCALARTYPE> & p) {
    	return (Point3<SCALARTYPE>(math::Abs(p[0]), math::Abs(p[1]), math::Abs(p[2])));
    }
    // probably a more uniform naming should be defined...
    template <class SCALARTYPE>
    inline Point3<SCALARTYPE> LowClampToZero(const Point3<SCALARTYPE> & p) {
      return (Point3<SCALARTYPE>(std::max(p[0], (SCALARTYPE)0), std::max(p[1], (SCALARTYPE)0), std::max(p[2], (SCALARTYPE)0)));
    }
    
    typedef Point3<short>  Point3s;
    typedef Point3<int>	   Point3i;
    typedef Point3<float>  Point3f;
    typedef Point3<double> Point3d;
    
    /*@}*/
    
    } // end namespace
    
    #endif
    

    link: https://mirror.umd.edu/roswiki/doc/diamondback/api/vcglib/html/deprecated__point3_8h_source.html

  909. ball_pivoting.h said, on March 9, 2013 at 12:18 am
    
    #ifndef BALL_PIVOTING_H
    #define BALL_PIVOTING_H
    
    #include "advancing_front.h"
    #include <vcg/space/index/grid_static_ptr.h>
    #include <vcg/complex/trimesh/closest.h>
    
    /* Ball pivoting algorithm:
       1) the vertices used in the new mesh are marked as visited
       2) the border vertices of the new mesh are marked as border
       3) the vector nb is used to keep track of the number of borders a vertex belongs to
       4) usedBit flag is used to select the points in the mesh already processed
      
    */   
    namespace vcg {
      namespace tri {
    
    template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
     public:
      typedef typename MESH::VertexType     VertexType;
      typedef typename MESH::FaceType       FaceType;
      typedef typename MESH::ScalarType     ScalarType;
      typedef typename MESH::VertexIterator     VertexIterator;
      typedef typename MESH::VertexType::CoordType   Point3x;
      typedef GridStaticPtr<typename MESH::VertexType, typename MESH::ScalarType > StaticGrid;        
      
      float radius;          //radius of the ball
      float min_edge;        //min lenght of an edge 
      float max_edge;        //min lenght of an edge 
      float max_angle;       //max angle between 2 faces (cos(angle) actually)  
      
     public:
      ScalarType radi() { return radius; }        
    
          // if radius ==0 an autoguess for the ball pivoting radius is attempted 
          // otherwise the passed value (in absolute mesh units) is used.
          
      BallPivoting(MESH &_mesh, float _radius = 0, 
                   float minr = 0.2, float angle = M_PI/2): 
                         
        AdvancingFront<MESH>(_mesh), radius(_radius), 
        min_edge(minr), max_edge(1.8), max_angle(cos(angle)),
        last_seed(-1) {
                      
        //compute bbox
        baricenter = Point3x(0, 0, 0);
        UpdateBounding<MESH>::Box(_mesh);
                for(VertexIterator vi=this->mesh.vert.begin();vi!=this->mesh.vert.end();++vi)
                      if( !(*vi).IsD() )  baricenter += (*vi).P();
        
        baricenter /= this->mesh.vn;
                
                assert(this->mesh.vn > 3);
        if(radius == 0) // radius ==0 means that an auto guess should be attempted. 
          radius = sqrt((this->mesh.bbox.Diag()*this->mesh.bbox.Diag())/this->mesh.vn);
          
    
        min_edge *= radius;
        max_edge *= radius;    
          
        //enlarging the bbox for out-of-box queries
                Box3<ScalarType> BPbbox=this->mesh.bbox;
        BPbbox.Offset(4*radius);
        grid.Set(this->mesh.vert.begin(), this->mesh.vert.end(), BPbbox);
        
        //mark visited points
        std::vector<VertexType *> targets;      
        std::vector<Point3x> points;      
        std::vector<ScalarType> dists;
        
        usedBit = VertexType::NewBitFlag();
        for(int i = 0; i < (int)this->mesh.vert.size(); i++)
           this->mesh.vert[i].ClearUserBit(usedBit);
           
        UpdateFlags<MESH>::VertexClearV(this->mesh);    
        
        for(int i = 0; i < (int)this->mesh.face.size(); i++) {
          FaceType &f = this->mesh.face[i];
          if(f.IsD()) continue;
          for(int k = 0; k < 3; k++) {
            f.V(k)->SetV();
            int n = tri::GetInSphereVertex(this->mesh, grid, f.V(k)->P(), min_edge, targets, dists, points);
            for(int t = 0; t < n; t++) {
              targets[t]->SetUserBit(usedBit);
              assert(targets[t]->IsUserBit(usedBit));
            }
            assert(f.V(k)->IsUserBit(usedBit));
          }
        }    
      }
      
      ~BallPivoting() {
        VertexType::DeleteBitFlag(usedBit);
      }
      
      bool Seed(int &v0, int &v1, int &v2) {               
        bool use_normals = false;     
        //get a sphere of neighbours
        std::vector<VertexType *> targets;      
        std::vector<Point3x> points;      
        std::vector<ScalarType> dists;
        while(++last_seed < (int)(this->mesh.vert.size())) {
          VertexType &seed = this->mesh.vert[last_seed];
          if(seed.IsD() || seed.IsUserBit(usedBit)) continue;                      
          
          seed.SetUserBit(usedBit);       
    
          int n = tri::GetInSphereVertex(this->mesh, grid, seed.P(), 2*radius, targets, dists, points);
          if(n < 3) {      
            continue;
          }        
          
          bool success = true;
          //find the closest visited or boundary
          for(int i = 0; i < n; i++) {         
            VertexType &v = *(targets[i]);
            if(v.IsV()) {        
              success = false;
              break;
            }
          }
          if(!success) continue;
          
          VertexType *vv0, *vv1, *vv2;
          success = false;
          //find a triplet that does not contains any other point
          Point3x center;
          for(int i = 0; i < n; i++) {
            vv0 = targets[i];
            if(vv0->IsD()) continue;
            Point3x &p0 = vv0->P();        
        
            for(int k = i+1; k < n; k++) {
              vv1 = targets[k];            
              if(vv1->IsD()) continue;
              Point3x &p1 = vv1->P();      
              float d2 = (p1 - p0).Norm();    
              if(d2 < min_edge || d2 > max_edge) continue;
        
              for(int j = k+1; j < n; j++) {
                vv2 = targets[j];
                if(vv2->IsD()) continue;
                Point3x &p2 = vv2->P();            
                float d1 = (p2 - p0).Norm();
                if(d1 < min_edge || d1 > max_edge) continue;            
                float d0 = (p2 - p1).Norm();
                if(d0 < min_edge || d0 > max_edge) continue;
                
                Point3x normal = (p1 - p0)^(p2 - p0);
                if(normal.dot(p0 - baricenter) < 0) continue;
    /*            if(use_normals) {             
                  if(normal * vv0->N() < 0) continue;
                  if(normal * vv1->N() < 0) continue;
                  if(normal * vv2->N() < 0) continue;
                }*/
                
                if(!FindSphere(p0, p1, p2, center)) {
                  continue;
                }
                           
                //check no other point inside
                int t;
                for(t = 0; t < n; t++) {              
                  if((center - targets[t]->P()).Norm() <= radius)
                    break;              
                }
                if(t < n) {
                  continue;                         
                }
                
                //check on the other side there is not a surface
                Point3x opposite = center + normal*(((center - p0).dot(normal))*2/normal.SquaredNorm());
                for(t = 0; t < n; t++) {
                  VertexType &v = *(targets[t]);
                  if((v.IsV()) && (opposite - v.P()).Norm() <= radius) 
                    break;              
                }
                if(t < n) {
                  continue;                         
                }
                success = true;
                i = k = j = n;
              }
            }
          }
          
          if(!success) { //see bad luck above
            continue;
          }
          Mark(vv0);
          Mark(vv1);
          Mark(vv2);            
          
          v0 = vv0 - &*this->mesh.vert.begin();
          v1 = vv1 - &*this->mesh.vert.begin();
          v2 = vv2 - &*this->mesh.vert.begin();            
          return true;      
        }
        return false;    
      }
      
      //select a new vertex, mark as Visited and mark as usedBit all neighbours (less than min_edge)
      int Place(FrontEdge &edge, std::list<FrontEdge>::iterator &touch) {
        Point3x v0 = this->mesh.vert[edge.v0].P();
        Point3x v1 = this->mesh.vert[edge.v1].P();  
        Point3x v2 = this->mesh.vert[edge.v2].P();  
        /* TODO why using the face normals everything goes wrong? should be
           exactly the same................................................
        
           Point3x &normal = mesh.face[edge.face].N(); ?
        */
        
        Point3x normal = ((v1 - v0)^(v2 - v0)).Normalize();        
        Point3x middle = (v0 + v1)/2;    
        Point3x center;    
    
        if(!FindSphere(v0, v1, v2, center)) {
    //      assert(0);
          return -1;
        }
        
        Point3x start_pivot = center - middle;          
        Point3x axis = (v1 - v0);
        
        ScalarType axis_len = axis.SquaredNorm();
        if(axis_len > 4*radius*radius) {
          return -1;
        }
        axis.Normalize();
        
        // r is the radius of the thorus of all possible spheres passing throug v0 and v1
        ScalarType r = sqrt(radius*radius - axis_len/4);
        
        std::vector<VertexType *> targets;
        std::vector<ScalarType> dists;    
        std::vector<Point3x> points;
        
        int n = tri::GetInSphereVertex(this->mesh, grid, middle, r + radius, targets, dists, points);
              
        if(targets.size() == 0) {
          return -1; //this really would be strange but one never knows.
        }
        
        VertexType *candidate = NULL;
        ScalarType min_angle = M_PI;
    
        for(int i = 0; i < static_cast<int>(targets.size()); i++) {      
          VertexType *v = targets[i];
          int id = v - &*this->mesh.vert.begin();
          if(v->IsD()) continue; 
    
          // this should always be true IsB => IsV , IsV => IsU
          if(v->IsB()) assert(v->IsV());
          if(v->IsV()) assert(v->IsUserBit(usedBit));
          
          
          if(v->IsUserBit(usedBit) && !(v->IsB())) continue;
          if(id == edge.v0 || id == edge.v1 || id == edge.v2) continue;
            
          Point3x p = this->mesh.vert[id].P();
                                    
          /* Find the sphere through v0, p, v1 (store center on end_pivot */
          if(!FindSphere(v0, p, v1, center)) {
            continue;      
          }
          
          /* Angle between old center and new center */
          ScalarType alpha = Angle(start_pivot, center - middle, axis);
        
          /* adding a small bias to already chosen vertices.
             doesn't solve numerical problems, but helps. */
        //          if(this->mesh.vert[id].IsB()) alpha -= 0.001;
          
          /* Sometimes alpha might be little less then M_PI while it should be 0,
             by numerical errors: happens for example pivoting 
             on the diagonal of a square. */
          
    /*      if(alpha > 2*M_PI - 0.8) {               
            // Angle between old center and new *point* 
            //TODO is this really overshooting? shouldbe enough to alpha -= 2*M_PI
            Point3x proj = p - axis * (axis * p - axis * middle);
            ScalarType beta = angle(start_pivot, proj - middle, axis);
          
            if(alpha > beta) alpha -= 2*M_PI; 
          } */
          if(candidate == NULL || alpha < min_angle) {
            candidate = v;
            min_angle = alpha;
          } 
        }
        if(min_angle >= M_PI - 0.1) {
          return -1;
        }
    
        if(candidate == NULL) {
          return -1;
        }
        if(!candidate->IsB()) {
          assert((candidate->P() - v0).Norm() > min_edge);
          assert((candidate->P() - v1).Norm() > min_edge);    
        }
        
        int id = candidate - &*this->mesh.vert.begin();
        assert(id != edge.v0 && id != edge.v1);
        
        Point3x newnormal = ((candidate->P() - v0)^(v1 - v0)).Normalize();
        if(normal.dot(newnormal) < max_angle || this->nb[id] >= 2) {
          return -1;
        }
    
        //test if id is in some border (to return touch
                for(std::list<FrontEdge>::iterator k = this->front.begin(); k != this->front.end(); k++)
          if((*k).v0 == id) touch = k;
                for(std::list<FrontEdge>::iterator k = this->deads.begin(); k != this->deads.end(); k++)
          if((*k).v0 == id) touch = k; 
           
        //mark vertices close to candidate
        Mark(candidate);
        return id;
      }
      
     private:
      int last_seed;     //used for new seeds when front is empty
      int usedBit;       //use to detect if a vertex has been already processed.
      Point3x baricenter;//used for the first seed.
      
      StaticGrid grid;       //lookup grid for points
      
        
      /* returns the sphere touching p0, p1, p2 of radius r such that
         the normal of the face points toward the center of the sphere */
         
      bool FindSphere(Point3x &p0, Point3x &p1, Point3x &p2, Point3x &center) {
        //we want p0 to be always the smallest one.
        Point3x p[3];
        
        if(p0 < p1 && p0 < p2) {
          p[0] = p0;
          p[1] = p1;
          p[2] = p2;          
        } else if(p1 < p0 && p1 < p2) {
          p[0] = p1;
          p[1] = p2;
          p[2] = p0;
        } else {
          p[0] = p2;
          p[1] = p0;
          p[2] = p1;
        }
        Point3x q1 = p[1] - p[0];
        Point3x q2 = p[2] - p[0];  
      
        Point3x up = q1^q2;
        ScalarType uplen = up.Norm();
      
        //the three points are aligned
        if(uplen < 0.001*q1.Norm()*q2.Norm()) {
          return false;
        }
        up /= uplen;
        
      
        ScalarType a11 = q1.dot(q1);
        ScalarType a12 = q1.dot(q2);
        ScalarType a22 = q2.dot(q2);
      
        ScalarType m = 4*(a11*a22 - a12*a12);
        ScalarType l1 = 2*(a11*a22 - a22*a12)/m;
        ScalarType l2 = 2*(a11*a22 - a12*a11)/m;
      
        center = q1*l1 + q2*l2;
        ScalarType circle_r = center.Norm();
        if(circle_r > radius) {
          return false; //need too big a sphere
        }
      
        ScalarType height = sqrt(radius*radius - circle_r*circle_r);
        center += p[0] + up*height;
      
        return true;
      }         
      
      /* compute angle from p to q, using axis for orientation */
      ScalarType Angle(Point3x p, Point3x q, Point3x &axis) {
        p.Normalize();
        q.Normalize();
        Point3x vec = p^q;
        ScalarType angle = acos(p.dot(q));
        if(vec.dot(axis) < 0) angle = -angle;
        if(angle < 0) angle += 2*M_PI;
        return angle;
      }          
      
      void Mark(VertexType *v) {
        std::vector<VertexType *> targets;      
        std::vector<Point3x> points;      
        std::vector<ScalarType> dists;       
        int n = tri::GetInSphereVertex(this->mesh, grid, v->P(), min_edge, targets, dists, points);
        for(int t = 0; t < n; t++) 
          targets[t]->SetUserBit(usedBit);
        v->SetV();
      }
    };
    
    } //namespace tri
    } //namespace vcg
    #endif
    
    

    link: http://meshlab.sourcearchive.com/documentation/1.2.2-2/ball__pivoting_8h-source.html

  910. advancing_front.h said, on March 9, 2013 at 1:07 am
    
    #ifndef MLS_ADVANCE_H
    #define MLS_ADVANCE_H
    
    #include <iostream>
    #include <list>
    #include <wrap/callback.h>
    #include <vcg/complex/trimesh/update/topology.h>
    #include <vcg/complex/trimesh/update/flag.h>
    
    namespace vcg {
      namespace tri {
    
    class FrontEdge { 
     public:       
      int v0, v1, v2;   //v0, v1 represent the FrontEdge, v2 the other vertex 
                        //in the face this FrontEdge belongs to    
      int face;         //index of the face             
      bool active; //keep tracks of wether it is in front or in deads
        
      //the loops in the front are mantained as a double linked list
      std::list<FrontEdge>::iterator next;            
      std::list<FrontEdge>::iterator previous;
      
      FrontEdge() {}
      FrontEdge(int _v0, int _v1, int _v2, int _face): 
                 v0(_v0), v1(_v1), v2(_v2), face(_face), active(true) {
                   assert(v0 != v1 && v1 != v2 && v0 != v2);
      }
    };  
    
    template <class MESH> class AdvancingFront {
     public:
    
      typedef typename MESH::VertexType     VertexType;
      typedef typename MESH::FaceType       FaceType;
      typedef typename MESH::ScalarType     ScalarType;
      typedef typename MESH::VertexType::CoordType   Point3x;
          
      
    
    // protected:
      std::list<FrontEdge> front;   
      std::list<FrontEdge> deads;
      std::vector<int> nb; //number of fronts a vertex is into,
                           //this is used for the Visited and Border flags
                           //but adding topology may not be needed anymore
    
     public:
      
      MESH &mesh;           //this structure will be filled by the algorithm
      
      AdvancingFront(MESH &_mesh): mesh(_mesh) {
    
        
        UpdateFlags<MESH>::FaceBorderFromNone(mesh);   
        UpdateFlags<MESH>::VertexBorderFromFace(mesh);     
    
        nb.clear();
        nb.resize(mesh.vert.size(), 0);
      
        CreateLoops();
      }
      virtual ~AdvancingFront() {}
      virtual ScalarType radi() { return 0; }
                            
      void BuildMesh(CallBackPos call = NULL, int interval = 512) {        
        while(1) {
          if(call) call(0, "Advancing front");
          for(int i = 0; i < interval; i++) {
            if(!front.size() && !SeedFace()) return;
            AddFace();
          }
        }
      }                          
      
    protected:
      //Implement these functions in your subclass          
      virtual bool Seed(int &v0, int &v1, int &v2) = 0;
      virtual int Place(FrontEdge &e, std::list<FrontEdge>::iterator &touch) = 0;  
    
      bool CheckFrontEdge(int v0, int v1) {
        int tot = 0;
        //HACK to speed up things until i can use a seach structure
    //    int i = mesh.face.size() - 4*(front.size());
    //    if(front.size() < 100) i = mesh.face.size() - 100;
        int  i = 0;
        if(i < 0) i = 0;
        for(; i < (int)mesh.face.size(); i++) { 
          FaceType &f = mesh.face[i];
          for(int k = 0; k < 3; k++) {
            if(v1== (int)f.V(k) && v0 == (int)f.V((k+1)%3)) ++tot;
            else if(v0 == (int)f.V(k) && v1 == (int)f.V((k+1)%3)) { //orientation non constistent
               return false;
            }
          }
          if(tot >= 2) { //non manifold
            return false;
          }
        }
        return true;
      }        
      
      //create the FrontEdge loops from seed faces
      void CreateLoops() {   
        VertexType *start = &*mesh.vert.begin();
        for(int i = 0; i < (int)mesh.face.size(); i++) {
          FaceType &f = mesh.face[i];     
          if(f.IsD()) continue;
           
          for(int k = 0; k < 3; k++) {
            if(f.IsB(k)) {
              NewEdge(FrontEdge(f.V0(k) - start, f.V1(k) - start, f.V2(k) - start, i));     
              nb[f.V0(k)-start]++;
            }          
          }
        }
      
        for(std::list<FrontEdge>::iterator s = front.begin(); s != front.end(); s++) {
          (*s).previous = front.end();
          (*s).next = front.end();      
        }
        //now create loops:
        for(std::list<FrontEdge>::iterator s = front.begin(); s != front.end(); s++) {
          for(std::list<FrontEdge>::iterator j = front.begin(); j != front.end(); j++) {
            if(s == j) continue;
            if((*s).v1 != (*j).v0) continue;
            if((*j).previous != front.end()) continue;
            (*s).next = j;
            (*j).previous = s;  
            break;
          }
        }
        for(std::list<FrontEdge>::iterator s = front.begin(); s != front.end(); s++) { 
          assert((*s).next != front.end());
          assert((*s).previous != front.end());      
        }
      }   
      
      bool SeedFace() {
        int v[3];
        bool success = Seed(v[0], v[1], v[2]);
        if(!success) return false;
      
        nb.resize(mesh.vert.size(), 0);
      
         //create the border of the first face  
        std::list<FrontEdge>::iterator e = front.end();
        std::list<FrontEdge>::iterator last = e;
        std::list<FrontEdge>::iterator first;
      
        for(int i = 0; i < 3; i++) {
          int v0 = v[i];
          int v1 = v[((i+1)%3)];
          int v2 = v[((i+2)%3)];
      
          mesh.vert[v0].SetB();
          nb[v[i]]++;
      
          e = front.insert(front.begin(), FrontEdge(v0, v1, v2, mesh.face.size()));
          if(i != 0) {
            (*last).next = e;    
            (*e).previous = last;
          } else
            first = e;
      
          last = e;
        } 
        //connect last and first
        (*last).next = first;
        (*first).previous = last;
      
        AddFace(v[0], v[1], v[2]);
        return true;
      }
      
    public:  
      bool AddFace() {
        if(!front.size()) return false; 
          
        std::list<FrontEdge>::iterator ei = front.begin();
        FrontEdge &current = *ei;
        FrontEdge &previous = *current.previous;           
        FrontEdge &next = *current.next;  
            
        int v0 = current.v0, v1 = current.v1;
        assert(nb[v0] < 10 && nb[v1] < 10);
            
        std::list<FrontEdge>::iterator touch = front.end();
        int v2 = Place(current, touch);
    
        if(v2 == -1) {
          KillEdge(ei);
          return false;
        }
        
        assert(v2 != v0 && v2 != v1);  
            
        if(touch != front.end()) {  
          //check for orientation and manifoldness    
          
          //touch == current.previous?  
          if(v2 == previous.v0) {   
            if(!CheckEdge(v2, v1)) {
              KillEdge(ei);
              return false;
            }       
              /*touching previous FrontEdge  (we reuse previous)        
                                        next
                 ------->v2 -----> v1------>
                          \       /
                           \     /
                   previous \   / current
                             \ /
                              v0           */
              
            Detach(v0);
      
            std::list<FrontEdge>::iterator up = NewEdge(FrontEdge(v2, v1, v0, mesh.face.size()));
            MoveFront(up);
            (*up).previous = previous.previous;
            (*up).next = current.next;
            (*previous.previous).next = up;
            next.previous = up;
            Erase(current.previous);
            Erase(ei);
            Glue(up);
    
          //touch == (*current.next).next         
          } else if(v2 == next.v1) {    
            if(!CheckEdge(v0, v2)) {
              KillEdge(ei);
              return false;
            }     
            /*touching next FrontEdge  (we reuse next)        
              previous
                 ------->v0 -----> v2------>
                          \       /
                           \     /
                            \   / next
                             \ /
                              v1           */      
        
            Detach(v1);
            std::list<FrontEdge>::iterator up = NewEdge(FrontEdge(v0, v2, v1, mesh.face.size()));
            MoveFront(up);
            (*up).previous = current.previous;
            (*up).next = (*current.next).next;
            previous.next = up;
            (*next.next).previous = up;
            Erase(current.next);
            Erase(ei);
            Glue(up);
          } else {
            if(!CheckEdge(v0, v2) || !CheckEdge(v2, v1)) {
              KillEdge(ei);
              return false;
            } 
          //touching some loop: split (or merge it is local does not matter.
          //like this 
          /*                 
                      left        right
                    <--------v2-<------
                              /|\
                             /   \
                         up /     \ down
                           /       \
                          /         V
                     ----v0 - - - > v1---------
                            current                         */           
            std::list<FrontEdge>::iterator left = touch;
            std::list<FrontEdge>::iterator right = (*touch).previous;      
            
            //this would be a really bad join
            if(v1 == (*right).v0 || v0 == (*left).v1) {
              KillEdge(ei);
              return false;
            }
            
            nb[v2]++;    
      
            std::list<FrontEdge>::iterator down = NewEdge(FrontEdge(v2, v1, v0, mesh.face.size()));      
            std::list<FrontEdge>::iterator up = NewEdge(FrontEdge(v0, v2, v1, mesh.face.size()));                            
          
            (*right).next = down;
            (*down).previous = right;
          
            (*down).next = current.next;
            next.previous = down;      
          
            (*left).previous = up;
            (*up).next = left;
      
            (*up).previous = current.previous;
            previous.next = up;
            Erase(ei);
          }                         
                  
          
        } else {
    //        assert(CheckEdge(v0, v2));
    //        assert(CheckEdge(v2, v1));
            /*  adding a new vertex
                     
                               v2
                              /|\
                             /   \
                         up /     \ down
                           /       \
                          /         V
                     ----v0 - - - > v1--------- */
            assert(!mesh.vert[v2].IsB()); //fatal error! a new point is already a border?
            nb[v2]++;                 
            mesh.vert[v2].SetB();
    
            std::list<FrontEdge>::iterator down = NewEdge(FrontEdge(v2, v1, v0, mesh.face.size()));
            std::list<FrontEdge>::iterator up = NewEdge(FrontEdge(v0, v2, v1, mesh.face.size()));                        
      
            (*down).previous = up;
            (*up).next = down;
            (*down).next = current.next;
            next.previous = down;
            (*up).previous = current.previous;
            previous.next = up;
            Erase(ei);
          }
    
          AddFace(v0, v2, v1);
          return false;
      }       
       
    protected:
      void AddFace(int v0, int v1, int v2) {
        assert(v0 < (int)mesh.vert.size() && v1 < (int)mesh.vert.size() && v2 < (int)mesh.vert.size());  
        FaceType face;
        face.V(0) = &mesh.vert[v0];
        face.V(1) = &mesh.vert[v1];
        face.V(2) = &mesh.vert[v2];
        ComputeNormalizedNormal(face);
        mesh.face.push_back(face);
        mesh.fn++;
      }
        
      void AddVertex(VertexType &vertex) {
        VertexType *oldstart = NULL;
        if(mesh.vert.size()) oldstart = &*mesh.vert.begin();
        mesh.vert.push_back(vertex);
        mesh.vn++;
        VertexType *newstart = &*mesh.vert.begin();
        if(oldstart && oldstart != newstart) { 
          for(int i = 0; i < mesh.face.size(); i++) {
            FaceType &face = mesh.face[i];
            for(int k = 0; k < 3; k++) 
              face.V(k) = newstart + (face.V(k) - oldstart);
          }
        }
        nb.push_back(0);
      }
    
    
      bool CheckEdge(int v0, int v1) {
        int tot = 0;
        //HACK to speed up things until i can use a seach structure
    /*    int i = mesh.face.size() - 4*(front.size());
        if(front.size() < 100) i = mesh.face.size() - 100;
        if(i < 0) i = 0;*/
        VertexType *vv0 = &(mesh.vert[v0]);
        VertexType *vv1 = &(mesh.vert[v1]);    
        
        for(int i = 0; i < (int)mesh.face.size(); i++) { 
          FaceType &f = mesh.face[i];
          for(int k = 0; k < 3; k++) {
            if(vv0 == f.V0(k) && vv1 == f.V1(k))  //orientation non constistent
               return false;              
            else if(vv1 == f.V0(k) && vv0 == f.V1(k)) ++tot;
          }
          if(tot >= 2) { //non manifold
            return false;
          }
        }
        return true;
      }        
      //front management:
    
      //Add a new FrontEdge to the back of the queue
      std::list<FrontEdge>::iterator NewEdge(FrontEdge e) {                  
        return front.insert(front.end(), e);
      }     
      
      //move an Edge among the dead ones
      void KillEdge(std::list<FrontEdge>::iterator e) {
        (*e).active = false;
        deads.splice(deads.end(), front, e);
      }
      
      void Erase(std::list<FrontEdge>::iterator e) {
        if((*e).active) front.erase(e);
        else deads.erase(e);
      }
      
      //move an FrontEdge to the back of the queue
      void MoveBack(std::list<FrontEdge>::iterator e) {
        front.splice(front.end(), front, e);          
      }
      
      void MoveFront(std::list<FrontEdge>::iterator e) {
        front.splice(front.begin(), front, e);
      }
      
      //check if e can be sewed with one of oits neighbours
      bool Glue(std::list<FrontEdge>::iterator e) {
        return Glue((*e).previous, e) || Glue(e, (*e).next);
      }
      
      //Glue toghether a and b (where a.next = b
      bool Glue(std::list<FrontEdge>::iterator a, std::list<FrontEdge>::iterator b) {
        if((*a).v0 != (*b).v1) return false; 
        
        std::list<FrontEdge>::iterator previous = (*a).previous;
        std::list<FrontEdge>::iterator next = (*b).next;
        (*previous).next = next;
        (*next).previous = previous;
        Detach((*a).v1);
        Detach((*a).v0); 
        Erase(a);
        Erase(b);  
        return true;
      }
      
      void Detach(int v) {
        assert(nb[v] > 0);
        if(--nb[v] == 0) {
          mesh.vert[v].ClearB();      
        }
      }      
    };
      
    template <class MESH> class AdvancingTest: public AdvancingFront<MESH> {
     public:
      typedef typename MESH::VertexType     VertexType;
      typedef typename MESH::VertexIterator VertexIterator;
      typedef typename MESH::FaceType       FaceType;
      typedef typename MESH::FaceIterator   FaceIterator;
    
      typedef typename MESH::ScalarType     ScalarType;
      typedef typename MESH::VertexType::CoordType   Point3x;
      
      AdvancingTest(MESH &_mesh): AdvancingFront<MESH>(_mesh) {}
    
      bool Seed(int &v0, int &v1, int &v2) {    
        VertexType v[3];
        v[0].P() = Point3x(0, 0, 0);
        v[1].P() = Point3x(1, 0, 0);
        v[2].P() = Point3x(0, 1, 0);
        v[0].ClearFlags();
        v[1].ClearFlags();
        v[2].ClearFlags();
    
        v0 = this->mesh.vert.size();
        AddVertex(v[0]);
        v1 = this->mesh.vert.size();
        AddVertex(v[1]);
        v2 = this->mesh.vert.size();
        AddVertex(v[2]);
        return true;
      }
      
      int Place(FrontEdge &e, std::list<FrontEdge>::iterator &touch) {
         Point3f p[3];
         p[0] = this->mesh.vert[e.v0].P();
         p[1] = this->mesh.vert[e.v1].P();
         p[2] = this->mesh.vert[e.v2].P();
         Point3f point = p[0] + p[1] - p[2];
    
         int vn = this->mesh.vert.size();
         for(int i = 0; i < this->mesh.vert.size(); i++) {
           if((this->mesh.vert[i].P() - point).Norm() < 0.1) {
             vn = i;
             //find the border
             assert(this->mesh.vert[i].IsB());
                             for(std::list<FrontEdge>::iterator k = this->front.begin(); k != this->front.end(); k++)
                if((*k).v0 == i) touch = k;
                             for(std::list<FrontEdge>::iterator k = this->deads.begin(); k != this->deads.end(); k++)
                if((*k).v0 == i) touch = k;              
             break;
           }
         }
         if(vn == this->mesh.vert.size()) {       
           VertexType v;
           v.P() = point;
           v.ClearFlags();
           AddVertex(v);
         }
         return vn;
      }
    };
    
    }//namespace tri
    }//namespace vcg
    
    #endif
    
    
    

    link: http://meshlab.sourcearchive.com/documentation/1.2.2-2/advancing__front_8h-source.html

  911. Ball pivoting with VCGLib — some experience said, on March 9, 2013 at 7:39 am

    VCGLib provides a GPL licensed open source implementation of this algorithm. There is also a sample example file for trying the algorithm with respect to an input ply file. This code can be found at here. There are mainly three problems we have faced (from a beginner’s point of view),

    1. It is difficult to include other libraries, e.g. PCL, OpenCV, etc.

    2. The generated mesh does not provide a coloured mesh (at least vertex coloured).

    3. Sometimes it provide surface reconstruction for a segment of points.

    Read more: http://banra.wordpress.com/2013/01/22/ball-pivoting-with-vcglib-some-experience/

  912. numpy: efficiently reading a large array said, on March 10, 2013 at 9:54 am

    NumPy provides fromfile() to read binary data.

    a = numpy.fromfile("filename", dtype=numpy.float32)
    

    link: http://stackoverflow.com/questions/4365964/numpy-efficiently-reading-a-large-array

  913. Python Tips, Tricks, and Hacks said, on March 10, 2013 at 9:56 am

    Contents

    1 Quick Tricks
    1.1 Four Kinds of Quotes
    1.2 Truthfulness of Various Objects
    1.3 Checking if a String Contains a Substring
    1.4 Pretty-Printing a List
    1.5 Integer vs. Float Division
    1.6 Lambda Functions
    2 Lists
    2.1 List Comprehensions
    2.1.1 Mapping the List
    2.1.2 Filtering the List
    2.1.3 Map and Filter at Once
    2.1.4 Generator Expressions
    2.1.5 Nested ‘for’ Statements
    2.1.6 Conclusion
    2.2 Reducing a List
    2.3 Iterating over a List: range, xrange and enumerate
    2.4 Checking a Condition on Any or Every List Element
    2.5 Combining Multiple Lists, Item by Item
    2.6 A Few More List Operators
    2.7 Advanced Logic With Sets
    3 Dictionaries
    3.1 Constructing Dictionaries with Keyword Arguments
    3.2 Dicts to Lists
    3.3 Lists to Dicts
    3.4 ‘Dictionary Comprehensions’
    4 Selecting Values
    4.1 The Right Way
    4.2 The and/or Trick
    4.3 Using True and False as Indexes
    5 Functions
    5.1 Default Argument Values are Only Evaluated Once
    5.1.1 Force Default Arguments to be Evaluated Each Time
    5.2 Arbitrary Numbers of Arguments
    5.2.1 Caveat
    5.3 Passing a List or Dictionary as Arguments
    5.4 Decorators
    5.5 ‘Switch Statements’ using Dictionaries of Functions
    6 Classes
    6.1 Passing ‘self’ Manually
    6.2 Checking for Property and Method Existence
    6.3 Modifying Classes After Creation
    6.4 Creating Class Methods
    7 Conclusion
    8 Other Python Articles I’ve Written
    9 References & Further Reading

    Read more: http://www.siafoo.net/article/52

  914. Numpy Data type objects (dtype) said, on March 10, 2013 at 9:59 am

    A data type object (an instance of numpy.dtype class) describes how the bytes in the fixed-size block of memory corresponding to an array item should be interpreted.

    Read more: http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html

  915. Install numpy on Ubuntu said, on March 10, 2013 at 10:34 am
    sudo apt-get install python-numpy
    
  916. NumPy fromfile() said, on March 10, 2013 at 10:40 am
    
    import numpy as np
    a = np.fromfile("filename", dtype=np.float64)
    print a[0:100]
    
    
  917. NumPy tofile() said, on March 10, 2013 at 8:56 pm
    
    from numpy import array
    
    floats = [3.14, 2.7, 0.0, -1.0, 1.1]
    a = array(floats,'float32')
    output_file = open('file', 'wb')
    a.tofile(output_file)
    output_file.close()
    
    
  918. Python WriteToFile() said, on March 10, 2013 at 9:41 pm
    def WriteToFile(filename,arr):
    	fout = open(filename,"wb")
    	ar=np.array(arr,np.float64)
    	ar.tofile(fout)
    	fout.close()
    
  919. NumPy for Numeric/numarray users said, on March 11, 2013 at 8:38 am

    link: http://mathesaurus.sourceforge.net/numeric-numpy.html

  920. Installing PyOpenGL said, on March 11, 2013 at 9:18 am
    
    wget https://pypi.python.org/packages/source/P/PyOpenGL/PyOpenGL-3.0.2.tar.gz
    tar -zxvf PyOpenGL-3.0.2.tar.gz
    cd PyOpenGL-3.0.2
    python setup.py install
    
    
  921. CentOS Install glib said, on March 11, 2013 at 12:26 pm
    
    yum -y install glib-devel
    
    
  922. CentOS Install gtk+ said, on March 11, 2013 at 12:31 pm
    
    yum install gtk2-devel
    
    
  923. Programming OpenGL in C/C++ said, on March 11, 2013 at 2:40 pm

    We need the following sets of libraries in programming OpenGL:

    + Core OpenGL (GL): consists of hundreds of functions, which begin with a prefix “gl” (e.g., glColor, glVertex, glTranslate, glRotate). The Core OpenGL models an object via a set of geometric primitives, such as point, line, and polygon.
    + OpenGL Utility Library (GLU): built on-top of the core OpenGL to provide important utilities and more building models (such as qradric surfaces). GLU functions start with a prefix “glu” (e.g., gluLookAt, gluPerspective)
    + OpenGL Utilities Toolkit (GLUT): provides support to interact with the Operating System (such as creating a window, handling key and mouse inputs); and more building models (such as sphere and torus). GLUT functions start with a prefix of “glut” (e.g., glutCreatewindow, glutMouseFunc).
    Quoting from the opengl.org: “GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits. GLUT is simple, easy, and small.”
    Alternative of GLUT includes SDL, ….
    + OpenGL Extension Wrangler Library (GLEW): “GLEW is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform.” Source and pre-build binary available at http://glew.sourceforge.net/.

    Each of the software package consists of:

    + A header file: “gl.h” for core OpenGL, “glu.h” for GLU, and “glut.h” (or “freeglut.h”) for GLUT, typically kept under “include\GL” directory.
    + A static library: for example, in Win32, “libopengl32.a” for core OpenGL, “libglu32.a” for GLU, “libglut32.a” (or “libfreeglut.a” or “glut32.lib”) for GLUT, typically kept under “lib” directory.
    + An optional shared library: for example, “glut32.dll” (for “freeglut.dll”) for GLUT under Win32, typically kept under “bin” or “c:\windows\system32″.

    Link: http://www3.ntu.edu.sg/home/ehchua/programming/opengl/HowTo_OpenGL_C.html

  924. Mozc install said, on March 11, 2013 at 9:20 pm

    Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux.

    link: http://kaworu.jpn.org/kaworu/2012-11-20-1.php#2012-11-20-1-6Kit5a6a

  925. Poligon Mesh Processing said, on March 12, 2013 at 10:42 am

    link: http://www.amazon.com/Polygon-Mesh-Processing-Mario-Botsch/dp/1568814267

    This book discusses the whole geometry processing pipeline based on triangle meshes. The pipeline starts with data input, for example, a model acquired by 3D scanning techniques. This data can then go through processes of error removal, mesh creation, smoothing, conversion, morphing, and more. The authors detail techniques for those processes using triangle meshes.

    A supplemental website contains downloads and additional information.

    link: http://www.pmp-book.org/

  926. Exuberant ctags (http://ctags.sf.net) not found in PATH said, on March 16, 2013 at 6:24 pm

    The bug depends on the vim plugin “taglist”. The plugin requirers the “Exuberant ctags” wich you can download at http://ctags.sf.net.

    After you have unziped it, you have to add the ctags location to the PATH variable, or set the Tlist_Ctags_Cmd variable in the .vimrc file (http://vim-taglist.sourceforge.net/manual.html#%27Tlist_Ctags_Cmd%27).
    e.g.
    Windows:
    let Tlist_Ctags_Cmd = ‘d:\tools\ctags.exe’

    Unix:
    let Tlist_Ctags_Cmd = ‘/usr/bin/ctags’

    Now restart Vim and the message shouldnt pop up again

    link: https://bugzilla.redhat.com/show_bug.cgi?id=429200

  927. Anonymous said, on March 20, 2013 at 11:22 am

    “If you’re not making mistakes, you’re not trying hard enough.”
    – Vince Lombardi, football coach

  928. Intel Non-Commercial Software Development Tools said, on March 20, 2013 at 5:10 pm

    Intel Non-Commercial Software Development Tools:

    link: http://software.intel.com/en-us/non-commercial-software-development

  929. Intel Non-Commercial Software Development Tools said, on March 20, 2013 at 6:54 pm

    To get started using Intel(R) VTune(TM) Amplifier XE 2013 Update 4:
    – To set your environment variables: source
    $HOME/opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh
    – To start the graphical user interface: amplxe-gui
    – To use the command-line interface: amplxe-cl
    – For more getting started resources:
    $HOME/opt/intel/vtune_amplifier_xe_2013/
    documentation/en/welcomepage/get_started.html.
    To get started using Intel(R) Inspector XE 2013 Update 4:
    – To set your environment variables: source
    $HOME/opt/intel/inspector_xe_2013/inspxe-vars.sh
    – To start the graphical user interface: inspxe-gui
    – To use the command-line interface: inspxe-cl
    – For more getting started resources:
    $HOME/opt/intel/inspector_xe_2013/
    documentation/en/welcomepage/get_started.html.
    To get started using Intel(R) Advisor XE 2013 Update 2:
    – To set your environment variables: source
    $HOME/opt/intel/advisor_xe_2013/advixe-vars.sh
    – To start the graphical user interface: advixe-gui
    – To use the command-line interface: advixe-cl
    – For more getting started resources: $HOME/opt/intel/advisor_xe_2013/
    documentation/en/welcomepage/get_started.html.
    To get started using Intel(R) Composer XE 2013 Update 2 for Linux*:
    – Set the environment variables for a terminal window using one of the
    following (replace “intel64″ with “ia32″ if you are using a 32-bit
    platform).
    For csh/tcsh:
    $ source $HOME/opt/intel/bin/compilervars.csh intel64
    For bash:
    $ source $HOME/opt/intel/bin/compilervars.sh intel64
    To invoke the installed compilers:
    For C++: icpc
    For C: icc
    For Fortran: ifort

    To get help, append the -help option or precede with the man command.
    – For more getting started resources:

    $HOME/opt/intel/composer_xe_2013/Documentation/en_US/get_started_lc.htm.

    $HOME/opt/intel/composer_xe_2013/Documentation/en_US/get_started_lf.htm.

  930. A third-party source said, on March 21, 2013 at 11:38 am

    A third-party source (as opposed to first-party source or second-party source) is independent of the first party and second party in a transaction, interview, or written description (etc.). A first-party source comes directly from the first party (such as a self-published document or product description). A second-party source is controlled by the second party, such as a customer who has written some product requirements, or a prior book or article written by the same author.

  931. Convert to vtk said, on March 21, 2013 at 7:04 pm
    
    #!/usr/bin/python
    # coding: UTF-8
    import csv
    from optparse import OptionParser
    
    def to_VTK(Points,Cells,cellType,outFile):
    	if cellType==5: #triangle
    		nPointsPerCell=3
    	elif cellType==10:#tetrahedral
    		nPointsPerCell=4
    	elif cellType==9:#quad
    		nPointsPerCell=4
    	elif cellType==1:#point
    		nPointsPerCell=1
    		Cells=[]
    		for i in range(len(Points)):
    			Cells.append([i+1])			
    	
    	nPoints = len(Points)
    	nCells = len(Cells) 
    
    	# point array
    	pointArr=[]
    	for point in Points:
    		line = []
    		for coords in point:
    			line.append(float(coords))
    		pointArr.append(line)
    
    	# cell array
    	cellArr=[]
    	for cell in Cells:
    		line = [nPointsPerCell] # quad 
    		for i in range(len(cell)):
    			line.append(int(cell[i])-1) #node index begins from 0 in vtk format
    		cellArr.append(line)
    							 
    	# celltype array
    	cellTypeArr = []
    	for i in range(nCells):
    		cellTypeArr.append([cellType]) # cell type
    
    	# write out vtk file
    	fout = open(outFile,"w")
    	w = csv.writer(fout, dialect = 'excel-tab')
    	Header=[['# vtk DataFile Version 3.1'], [], ['ASCII'], ['DATASET UNSTRUCTURED_GRID']]
    	PointHeader=[["POINTS",nPoints,"FLOAT"]]
    	CellHeader=[["CELLS",nCells,nCells*(nPointsPerCell+1)]]
    	CellTypeHeader=[["CELL_TYPES",nCells]]
    	w.writerows(Header)
    	w.writerows(PointHeader)
    	w.writerows(pointArr)
    	w.writerows(CellHeader)
    	w.writerows(cellArr)
    	w.writerows(CellTypeHeader)
    	w.writerows(cellTypeArr)
    	fout.close()
    	return 
    
    def loadFile(filename) :
    	L = [] 
    	fh = open(filename,'r')
    	lines=fh.readlines()
    	fh.close()
    	for line in lines :
    		line = line.split()
    		L.append(line)
    	return L 
    
    
    def main():
    	usage = "python %prog [option] filename"
    	parser = OptionParser(usage)
    	parser.add_option("-n", "--node", type="string",dest="nodeFile",help="Name of the node file")
    	parser.add_option("-c", "--cell", type="string",dest="cellFile",help="Name of the cell file")
    	parser.add_option("-t", "--type", type="int",dest="cellType",help="data type")
    	(options, args) = parser.parse_args()
    
    	if (options.nodeFile is None): 
    		parser.error("There is no argument for NODE FILE")
    		return
    	
    	if (options.cellFile is None): 
    	#point to vtk
    		Points=loadFile(options.nodeFile)
    		outFile=options.nodeFile+".vtk"
    		to_VTK(Points,[],1,outFile)
    		print "+ creating file: ", outFile
    		return 
    	
    	if (options.cellType is None): 
    		parser.error("There is no argument for CELL TYPE")
    		return
    	
    	if (options.cellFile is not None): 
    	#cell to vtk
    		Points=loadFile(options.nodeFile)
    		Cells=loadFile(options.cellFile)
    		outFile=options.cellFile+".vtk"
    		cellType=options.cellType
    		to_VTK(Points,Cells,cellType,outFile)
    		print "+ creating file: ", outFile
    		return
    
    if __name__ == "__main__":
    	main()
    
    

    link: http://ubuntuone.com/4n294IjTrO6nmBHbuYXKpp

  932. Unstructured Grid Particle Example said, on March 21, 2013 at 9:12 pm
    # vtk DataFile Version 3.0
    Unstructured Grid Particle Example
    ASCII
    DATASET UNSTRUCTURED_GRID
    POINTS  10  float
      2.1  0.2  0.3
      1.4  0.5  0.6
      0.7  0.8  0.9
      1.4  1.5  0.5
      2.5  0.6  2.7
      0.7  0.5  0.3
      2.5  1.2  0.3
      1.2  0.5  0.4
      1.3  2.0  0.2
      0.7  0.2  1.6
    
    CELLS 10 20
    1 0  1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9
    
    CELL_TYPES 10
    1 1 1 1 1 1 1 1 1 1
    
    POINT_DATA           10
    SCALARS group int
    LOOKUP_TABLE default
    1
    2
    3
    4
    5
    1
    2
    3
    4
    5
    
  933. VTK data format said, on March 21, 2013 at 9:51 pm

    VTK data format:

    link: http://www.vtk.org/VTK/img/file-formats.pdf

  934. Anonymous said, on March 21, 2013 at 9:57 pm

    “Everyone starts from scratch, but not everyone keeps on scratching!”– Anonymous

  935. Anonymous said, on March 21, 2013 at 9:58 pm

    “We either make ourselves miserable or we make ourselves strong. The amount of work is the same.”
    – Carlos Castaneda, author

  936. Anonymous said, on March 21, 2013 at 10:01 pm

    “The freedom to share one’s insights and judgments verbally or in writing is, just like the freedom to think, a holy and inalienable right of humanity that, as a universal human right, is above all the rights of princes.”
    –Carl Friedrich Bahrdt

    Carl Friedrich Bahrdt (1740–1792), German theologian and publicist. On Freedom of the Press and Its Limits: For Consideration by Rulers, Censors, and Writers, p. 44 (1787).

    Read more at http://quotes.dictionary.com/the_freedom_to_share_ones_insights_and_judgments#CBKMGg1TpAfEo10I.99

  937. Anonymous said, on March 21, 2013 at 10:06 pm

    “I’ve come to believe that each of us has a personal calling that’s as unique as a fingerprint–and that the best way to succeed is to discover what you love and then find a way to offer it to others in the form of service, working hard, and also allowing ”

    – Oprah Winfrey, Talk Show Host

  938. VTK data format said, on March 22, 2013 at 3:17 pm

    VTK data format

    # vtk DataFile Version 3.1 
      this is an example file created for VisuSimple
      ASCII
      DATASET UNSTRUCTURED_GRID 
    
    POINTS 9 FLOAT 
        0 0 0
        0 1 0
        0 2 0
        1 2 0
        1 1 0
        1 0 0
        2 0 0
        2 1 0
        2 2 0
    
    CELLS 4 20
        4 0 5 4 1
        4 1 4 3 2
        4 5 6 7 4
        4 4 7 8 3
    
        CELL_TYPES 4
        9 9 9 9
      
    POINT_DATA 9
        SCALARS HorizontalSpeed FLOAT 
        LOOKUP_TABLE default
        0
        0
        0
        1
        2
        1
        0
        0
        0
    
        SCALARS Temperature FLOAT 
        LOOKUP_TABLE default
        1
        1.1
        1.2
        2.1
        2.5
        3.5
        1.3
        1.4
        1.6
    
    CELL_DATA 4
        SCALARS Cell_Temperature FLOAT 
        LOOKUP_TABLE default
        0
        1
        2
        1
      
    

    link: http://dunne.uni-hd.de/VisuSimple/documents/vtkfileformat.html#pointdata

  939. VTK data format said, on March 22, 2013 at 3:23 pm
    
    # vtk DataFile Version 3.1 
    this is an example file created for VisuSimple
      
    ASCII
    DATASET UNSTRUCTURED_GRID 
    POINTS 9 FLOAT 
        0 0 0
        0 1 0
        0 2 0
        1 2 0
        1 1 0
        1 0 0
        2 0 0
        2 1 0
        2 2 0
     
    CELLS 4 20
        4 0 5 4 1
        4 1 4 3 2
        4 5 6 7 4
        4 4 7 8 3
     
    CELL_TYPES 4
        9 9 9 9
       
    POINT_DATA 9
    SCALARS HorizontalSpeed FLOAT 
    LOOKUP_TABLE default
        0
        0
        0
        1
        2
        1
        0
        0
        0
     
    SCALARS Temperature FLOAT 
    LOOKUP_TABLE default
        1
        1.1
        1.2
        2.1
        2.5
        3.5
        1.3
        1.4
        1.6
     
    CELL_DATA 4
    SCALARS Cell_Temperature FLOAT 
    LOOKUP_TABLE default
        0
        1
        2
        1
    
    
  940. Python Write to text file said, on March 22, 2013 at 4:21 pm
    
    def writeFile(array,filename):
    	fout = open(filename,"w")
    	w = csv.writer(fout, dialect = 'excel-tab')
    	w.writerows(array)
    	fout.close()
    	return 
    
    
  941. Anonymous said, on March 24, 2013 at 3:31 pm

    “I was taught that the way of progress is neither swift nor easy.”
    – Marie Curie, Physicist

  942. Anonymous said, on March 24, 2013 at 3:37 pm

    “Anger is a wind which blows out the lamp of the mind.”
    – Robert G Ingersoll, American Political Leader

  943. Anonymous said, on March 24, 2013 at 3:46 pm

    The Design of Everyday Things

    
    The Review by By Jeffrey Sauro
    
    This is one of the seminal works in the field of User Centered Design. Norman wrote this book well before the Windows operating system was as familiar as the Golden Arches--which only reinforces the idea that certain basic usability principles transcend all forms of objects--from glass doors to Windows Explorer.
    Norman does a great job of describing why and how we successfully and unsuccessfully use everyday objects with relevant anecdotes. His stories are usually accompanied with lists of principles that explain good design and account for human behavior. For example, the fundamental principals of designing for people are to: Provide a good conceptual model, make controls visible and to constantly provide feedback to the user.
    
    So how does one employ good user-centered design? Norman recapitulates his points at the end of the book by listing the seven UCD principles for transforming difficult tasks into easy ones:
    1. Use both knowledge in the world and in the head
    
    2. Simplify the structure of tasks
    3. Make things visible
    4. Get the mappings right
    5. Exploit the powers of constraints-Natural & Artificial
    6. Design for Error
    7. When all else fails, standardize
    
    It's mandatory reading for any usability software engineer but also an interesting and well written book for anyone who's ever pushed a "pull door" or scalded themselves in the shower (which is all of us).
    
    
  944. Anonymous said, on March 25, 2013 at 10:14 am

    “The future belongs to those who believe in the beauty of their dreams.”-Eleanor Roosevelt

  945. Anonymous said, on March 25, 2013 at 10:15 am

    “The poor man is not he who is without a cent, but he who is without a dream.”-Harry Kemp

  946. NTFS in CentOS said, on March 25, 2013 at 7:10 pm

    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

    yum install ntfs-3g

  947. ssh said, on March 27, 2013 at 2:01 pm

    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). が表示される場合はパーミッションを見直す。~/.sshディレクトリを700、authorized_keysは600、また、クライアント側の~/.ssh/id_rsaファイルも600にしないといけない。

    CentOSでは、sshが吐き出すログは/var/log/secure。

    link: https://gitrhythm.heroku.com/blog/2012/01/20/ssh-setup/

  948. Change Timezone for CentOS said, on March 28, 2013 at 5:56 pm
    mv /etc/localtime /etc/localtime.old
    ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
    
    yum install ntp
    ntpdate pool.ntp.org
    
  949. Responses to "MRI scan into 3D image" said, on March 31, 2013 at 7:16 pm

    link: http://biomch-l.isbweb.org/threads/20279-Responses-to-MRI-scan-into-3D-image

  950. Enable Epel repository said, on April 6, 2013 at 4:33 pm
    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
    
  951. Install Mesa said, on April 6, 2013 at 4:57 pm
    yum whatprovides \*/glu.h
    
    yum install mesa-libGL-devel mesa-libGLU-devel
    
  952. Anonymous said, on April 10, 2013 at 3:02 pm

    “Four short words sum up what has lifted most successful individuals above the crowd: a little bit more. They did all that was expected of them and a little bit more. ”
    – Lou Vickery, American Business Writer

  953. Anonymous said, on April 10, 2013 at 3:04 pm

    “Just as your car runs more smoothly and requires less energy to go faster and farther when the wheels are in perfect alignment, you perform better when your thoughts, feelings, emotions, goals, and values are in balance.”
    – Brian Tracy, Author

  954. Anonymous said, on April 11, 2013 at 10:54 am

    +−−−−−−−−−+−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−+
    | | shareable | unshareable |
    +−−−−−−−−−+−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−+
    |static | /usr | /etc |
    | | /opt | /boot |
    +−−−−−−−−−+−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−+
    |variable | /var/mail | /var/run |
    | | /var/spool/news | /var/lock |
    +−−−−−−−−−+−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−+
    “Shareable” files are defined as those that can be stored on one host and
    used on others. “Unshareable” files are those that are not shareable. For
    example, the files in user home directories are shareable whereas device
    lock files are not. “Static” files include binaries, libraries,
    documentation files and other files that do not change without system
    administrator intervention. “Variable” files are defined as files that
    are not static.

  955. Anonymous said, on April 17, 2013 at 8:36 pm
    
    Try these al