2014년 12월 26일 금요일

rotation VS orientation

An orientation is a state: “the object’s orientation is…”
A rotation is an operation: “Apply this rotation to the object”

That is, when you apply a rotation, you change the orientation. Both can be represented with the same tools, which leads to the confusion.

from http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-17-quaternions/

2014년 10월 25일 토요일

Missing launcher and window menu bar of Ubuntu 12.04 on Paralles

Parallels 에 돌아가는 Ubuntu 의 menu bar가 사라져있음.

해결 : unity --reset

2014년 9월 29일 월요일

Hardware Accelerated Execution Manager


다음의 에러:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX is not installed on this machine (/dev/HAX is missing).

Intel® Hardware Accelerated Execution Manager 설치하면 됨.
The Intel Hardware Accelerated Execution Manager (Intel HAXM) is a hardware-assisted virtualization engine (hypervisor) that uses Intel Virtualization Technology (Intel VT) to speed up Android app emulation on a host machine.


2014년 9월 9일 화요일

string이 URL 형태인지 체크 (Java)


import java.net.MalformedURLException;
import java.net.URL;


try { URL url = new URL("url_string"); }
catch (MalformedURLException e) { /* invalid URL */ }



http://stackoverflow.com/questions/9902265/find-out-the-string-is-url

2014년 9월 2일 화요일

Permission issue of Apache2 on OSX Mavericks

Permission issue of Apache2 on OS X Mavericks :



sudo vi /private/etc/apache2/httpd.conf

Just replace "Deny" with "Allow"

    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Allow from all

Restart Apache server :
sudo apachectl restart

"It works!"

2014년 9월 1일 월요일

Lemon 설치


아래와 같이 Policy 때문에 설치가 안됨.
관련 문서 : http://www.cmake.org/cmake/help/v3.0/policy/CMP0048.html

$ cmake ..
CMake Error at CMakeLists.txt:3 (CMAKE_POLICY):
  Policy "CMP0048" is not known to this version of CMake.

CMakeLists.txt 에서 주석처리함.

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

#CMAKE_POLICY(SET CMP0048 OLD)

SET(PROJECT_NAME "LEMON")
PROJECT(${PROJECT_NAME})


$ cmake ..
CMake Error at CMakeLists.txt:3 (CMAKE_POLICY):
  Policy "CMP0048" is not known to this version of CMake.


-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
-- Found Wget: /usr/bin/wget
-- Found Doxygen: /usr/bin/doxygen
-- Found Ghostscript: /usr/bin/gs
-- Found GLPK: /usr/lib/libglpk.so (Required is at least version "4.33")
-- Could NOT find ILOG (missing:  ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR)
-- Could NOT find COIN (missing:  COIN_INCLUDE_DIR COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY)
-- Could NOT find SOPLEX (missing:  SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Copy doc from source tree
-- Configuring incomplete, errors occurred!






2014년 8월 10일 일요일

Fragment 동적으로 만들떄

동적으로 만들때


xml 쪽에는
       android:id="@+id/fragment_place"
       android:layout_height="match_parent">
 

or

        android:id="@+id/fragment_place"
        android:layout_marginTop="120dp"
        android:layout_height="match_parent"
        android:layout_width="match_parent"        >
   


.java 파일에는
...
// Create new fragment and transaction
        Fragment newFragment = new FragmentDefault();
        FragmentTransaction transaction = getFragmentManager().beginTransaction();
// Replace whatever is in the fragment_container view with this fragment,
// and add the transaction to the back stack
        transaction.replace(R.id.fragment_place, newFragment);
        transaction.addToBackStack(null);
// Commit the transaction
        transaction.commit();


https://github.com/codepath/android_guides/wiki/Creating-and-Using-Fragments

2014년 7월 31일 목요일

Android에서 키보드 사라지게 하기


다음처럼부르면 됨

DDUtil.setupUI(MainActivity.this, findViewById(R.id.parent));


다음처럼 간단히
public class DDUtil {
    public static void setupUI(final Activity activity, View view) {
        //Set up touch listener for non-text box views to hide keyboard.
        if(!(view instanceof EditText)) {
            view.setOnTouchListener(new View.OnTouchListener() {
                public boolean onTouch(View v, MotionEvent event) {
                    hideSoftKeyboard(activity);//MainActivity.this
                    return false;
                }
            });
        }
        //If a layout container, iterate over children and seed recursion.
        if (view instanceof ViewGroup) {
            for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {
                View innerView = ((ViewGroup) view).getChildAt(i);
                setupUI(activity, innerView);
            }
        }
    }
    public static void hideSoftKeyboard(Activity activity)
    {
        InputMethodManager inputMethodManager = (InputMethodManager)  activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
        inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
    }
}



참고 :
http://stackoverflow.com/questions/4165414/how-to-hide-soft-keyboard-on-android-after-clicking-outside-edittext


2014년 7월 28일 월요일

Maya: parenting an object


parent 붙일child  parent노드


풀기 : unparent given object(s) -- parent to world
parent -w instrument_asm_10mm;

엮기
parent 붙일child  parent노드
parent coupler:IGES_Model_Data active_arm_v1_tmp:transform1094;


아래는 공식 사이트에서


// Move the circle under group2.
// Note that the circle remains where it is.
parent circle1 group2;


2014년 7월 9일 수요일

CMAttitudeReferenceFrame

Enum constants for indicating the reference frames from which all attitude samples are referenced.


typedef enum {
     CMAttitudeReferenceFrameXArbitraryZVertical = 1 << 0,
     CMAttitudeReferenceFrameXArbitraryCorrectedZVertical = 1 << 1,
     CMAttitudeReferenceFrameXMagneticNorthZVertical = 1 << 2,
     CMAttitudeReferenceFrameXTrueNorthZVertical = 1 << 3
} CMAttitudeReferenceFrame


CMAttitudeReferenceFrameXArbitraryZVertical
: Describes a reference frame in which the Z axis is vertical and the X axis points in an arbitrary direction in the horizontal plane.

CMAttitudeReferenceFrameXArbitraryCorrectedZVertica
: Describes the same reference frame as CMAttitudeReferenceFrameXArbitraryZVertical except that the magnetometer, when available and calibrated, is used to improve long-term yaw accuracy. Using this constant instead of CMAttitudeReferenceFrameXArbitraryZVertical results in increased CPU usage.

CMAttitudeReferenceFrameXMagneticNorthZVertical
: Describes a reference frame in which the Z axis is vertical and the X axis points toward magnetic north. Note that using this reference frame may require device movement to calibrate the magnetometer.

CMAttitudeReferenceFrameXTrueNorthZVertical
: Describes a reference frame in which the Z axis is vertical and the X axis points toward true north. Note that using this reference frame may require device movement to calibrate the magnetometer. It also requires the location to be available in order to calculate the difference between magnetic and true north.

all available in iOS 5.0 and later.


source : Apple dev page.

2014년 7월 6일 일요일

atan2

The atan2 function takes into account the signs of both vector components, and places the angle in the correct quadrant.



The following expression derived from the tangent half-angle formula can also be used to define atan2.




from http://en.wikipedia.org/wiki/Atan2

2014년 7월 1일 화요일

CWnd::~CWnd


Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called.


Callback code

/* Return code for callbacks, determines whether the operation is finished
   and will unscheduled, or whether it will continue running. */

typedef unsigned int HDCallbackCode;
#define HD_CALLBACK_DONE     0
#define HD_CALLBACK_CONTINUE 1

from
\OpenHaptics\Academic\3.2\include\HD\hdScheduler.h

2014년 5월 29일 목요일

Missing Solidworks menu bar



HKEY_CURRENT_USER\Software\SolidWorks\Solidworks 2010\User Interface\CommandManager - Switch the Dock State to something something else.  In other words if it is et to "1" set it to "0".

from https://forum.solidworks.com/message/203457#203457

2014년 5월 20일 화요일

ofVec3f.h

아래처럼 벡터 클래스 개조

float * getPtr()
{
return (float*)&x;
}

float& operator[]( int n )
{
return getPtr()[n];
}


from ofVec3f.h

2014년 5월 18일 일요일

미터 규격 나사 부호 매기는 법

미터 규격 나사 부호 매기는 법






규격 비교표

2014년 5월 8일 목요일

IEEE 저널 Single column latex format


IEEE 저널 Single column latex format

Default:
\documentclass[10pt,journal,cspaper,compsoc]{IEEEtran}

--> 이걸로 변경
\documentclass[journal,10pt,draftclsnofoot,onecolumn]{IEEEtran}

from http://www.michaelshell.org/tex/ieeetran/

2014년 4월 29일 화요일

다양성을 인정하지 않는 정답지


저걸 틀렸다고 채점하는 선생님을 만든 사회가 안타깝다



출처 : http://blog.naver.com/changkh/30189708248

2014년 4월 17일 목요일

Characteristic motions of common human-controlled devices

Characteristic motions of common human-controlled devices
from Inertial proprioceptive devices: Self-motion-sensing toys and tools by C. Verplaetse


2014년 4월 11일 금요일

Doctor Who Theme on eight floppy drives

Doctor Who Theme on eight floppy drives

2014년 4월 2일 수요일

윈도우로의 samba 접속이 안될때

firewall.cpl


고급에서 아래와 같이 Inbound 규칙중에 Netlogon 서비스를 켜주면 됨.



A Hopping Bionic Kangaroo

멋있다.

2014년 3월 15일 토요일

Differential pressure


  • p(pearl) = 40%
  • p(blue|pearl) = 30%
  • p(blue|~pearl) = 10%
  • p(pearl|blue) = ?


Differential pressure between the two conditional probabilities,  p(blue|pearl) and p(blue|~pearl) 의 개념



it's easier to see why the final answer depends on all three probabilities; it's the differential pressure between the two conditional probabilities,  p(blue|pearl) and p(blue|~pearl), that slides the prior probability p(pearl) to the posterior probability p(pearl|blue).

...
you can see that when the conditional probabilities are equal, there's no differential pressure - the arrows are the same size - so the prior probability doesn't slide between the top bar and the bottom bar.



In the frequency visualization, ... The bottom bar is shorter than the top bar, just as the number of eggs painted blue is less than the total number of eggs.


The gif file created from the applet at http://yudkowsky.net/rational/bayes

2014년 3월 10일 월요일

Stupid Smart Stuff - "a dangerous myth"


Interesting article by Prof. Don Norman

Stupid Smart Stuff: Watches and Automation :
How silly. The notion that we can have automated or semi-automated cars as long as the driver is watching over them is a dangerous myth. 

It is a myth that people can maintain control when they have nothing to do for a long period.

This myth is well understood in the military and in commercial aviation. 

http://networkedblogs.com/UA6IZ

2014년 2월 18일 화요일

use it or lose it

신경가소성


우리의 마음과 지능을 구성하는 뇌의 신경망은 외부 자극에 의해 끊임없이 바뀐다. 이를 ‘신경가소성’이라 말한다. 신경가소성의 기본적인 원칙은 ‘쓰면 발달하고 그러지 않으면 잃는다’(use it or lose it)는 것이다. 인간의 뇌를 구성하는 회로는 고정된 것이 아니라 우리가 하는 행동과 받는 자극에 따라 끊임없이 변한다는 게 다양한 연구 결과로 뒷받침되고 있다.

http://www.hani.co.kr/arti/society/society_general/617907.html
http://en.wikipedia.org/wiki/Neuroplasticity

2014년 2월 13일 목요일

2014년 2월 11일 화요일

forgetting curve

The forgetting curve hypothesises the decline of memory retention in time.

From the lab seminar of HRI group.
http://en.wikipedia.org/wiki/Forgetting_curve

CC3Mesh in Cocos3D

/*
 * /cocos3d/cocos3d/Meshes/
 * CC3Mesh is an abstract class. Subclasses can be created for loading and managing
 * meshes from different sources and third-party libraries.
 */

@interface CC3Mesh : CC3Identifiable {
CC3FaceArray* _faces;
CC3VertexLocations* _vertexLocations;
CC3VertexNormals* _vertexNormals;
CC3VertexTangents* _vertexTangents;
CC3VertexTangents* _vertexBitangents;
CC3VertexColors* _vertexColors;
CC3VertexTextureCoordinates* _vertexTextureCoordinates;
CCArray* _overlayTextureCoordinates;
CC3VertexMatrixIndices* _vertexMatrixIndices;
CC3VertexWeights* _vertexWeights;
CC3VertexPointSizes* _vertexPointSizes;
CC3VertexIndices* _vertexIndices;
GLfloat _capacityExpansionFactor;
BOOL _shouldInterleaveVertices : 1;

}

...


2014년 2월 8일 토요일

Cauchy-Lorentz Distribution


Cauchy-Lorentz distribution has "heavier tails" than the Gaussian distribution.


Implementation in Boost library:
http://www.boost.org/doc/libs/1_36_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/cauchy_dist.html



2014년 2월 4일 화요일

Too many simulators


Too many simulators !!!

2014년 1월 28일 화요일

AR Box

새로 가공한 AR Marker 상자.


2014년 1월 24일 금요일

Cholesky Decomposition


CholeskyDecomposition의 결과 return code.

struct btCholeskyDecomposition
{
  enum Result
  {
    SUCCESS,
    FAILURE_SYMMETRY,
    FAILURE_POSITIVE_DEFINITE
  };
};