Diary

Android – Android Studio > How can I add a “library Project” in Intellij IDEA

I don’t know when does it release.

That name is Android Studio.

I installed it yesterday. It was organized IntelliJ.

Indeed, I’m just wondering that It would be used by developers.

Anyway. sometime new tool is hard to learn and to make me bothered.

So I always think about that I’ve to find my tool.

it’s also hard. because there is no perfect tool in the world.

That’s why it has been still coming new tool.

I’ve to decide tool which am i gonna using.

Eclipse VS IntelliJ

Which one do you prefer to developer for android?

anyway I am trying to use IntelliJ to developer android application.

so i got new problem that is how can I add a “Library Project” in IntelliJ IDEA.

following description is solution.

————————————————

ref : http://stackoverflow.com/questions/8884662/how-can-i-add-a-library-project-in-intellij-idea

You need to create a new IDEA module form the existing source code.

Ensure that Android facet is enabled for this module, in the facet settings you need to enable “Is Library Project” option. Then add this module as a dependency to your main module.

————————————————

Thanks buddy.

Standard
Diary

Diary – What a beautiful day it is

I wake up at 9.

But I still stay to watch TV Drama on bed.

It was so so.

Now? It’s 1 o’clock. I am thinking about my life again.

It repeat to think something what it’s good for me every day.

It make me confused. How… how… How can i do what i want to.

it is really boring to make application……

because i am working alone.. i don’t want to be alone…

anyway i will work few minute and i will go to gym.

bye.

Standard
iPhone

iPhone – NSInvalidUnarchiveOperationException: Could not instantiate class named NSLayoutConstraint

I got some following error:

Terminating app due to uncaught
exception ‘NSInvalidUnarchiveOperationException’, reason: ‘Could not instantiate
class named NSLayoutConstraint’

but It’s simple.

you can fix it as following solution.

By default, when you create a new iOS project in Xcode 4.5, your storyboard or XIB is set to use Autolayout, which is a new feature in iOS 6.0. The NSLayoutConstraint class is part of the Autolayout system, and it doesn’t exist in older versions of iOS.

If you want to deploy your app to an older version of iOS, you need to change your storyboard or XIB to not use Autolayout. It’s a checkbox in the File Inspector:

I refer to the stack overflow.

http://stackoverflow.com/questions/13201586/nsinvalidunarchiveoperationexception-could-not-instantiate-class-named-nslayout

Standard
MySQL

OS X – My SQL Socket Error.

I was getting some error while execute mysql.

It’s just socket error.

If you have /tmp/mysql.sock but no /var/mysql/mysql.sock then…

# cd /var 
# mkdir mysql
# cd mysql
# ln -s /tmp/mysql.sock mysql.sock

If you have /var/mysql/mysql.sock but no /tmp/mysql.sock then

# cd /tmp
# ln -s /var/mysql/mysql.sock mysql.sock

You will need permissions to create the directory and link, so just prefix the commands above with sudo if necessary.

you got this site :

http://stackoverflow.com/questions/4219970/warning-mysql-connect-2002-no-such-file-or-directory-trying-to-connect-vi

Standard
OSX

OS X – PHP doesn’t work.

When I executed Web-Sever, It didn’t work.

So I confirm to use following words.

 # sudo apachectl configtest

I saw following error message.

httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): Library not loaded: @loader_path/../lib/libcrypto.dylib\n Referenced from: /usr/lib/libpq.5.dylib\n Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libcrypto.0.9.8.dylib provides version 0.9.8

It was easy to solve.

Just check what you are using library for web server.

 # ls -la /usr/lib/libssl.dylib 

lrwxr-xr-x 1 root wheel 33 Aug 17 12:25 /usr/lib/libssl.dylib -> /opt/local/lib/libssl.1.0.0.dylib

 # ls -la /usr/lib/libcrypto.dylib 

lrwxr-xr-x 1 root wheel 36 Aug 17 12:28 /usr/lib/libcrypto.dylib -> /opt/local/lib/libcrypto.1.0.0.dylib

and then Just do it.

sudo ln -s /path/to/postgres/install/lib/libcrypto.dylib /usr/lib/libcrypto.dylib
sudo ln -s /path/to/postgres/install/lib/libssl.dylib /usr/lib/libssl.dylib

Actually my original directory is ‘/opt/local/lib’.

I copied and pasted following site.

http://stackoverflow.com/questions/11127486/rails-postgres-error-reason-incompatible-library-version-libpq-5-dylib-requ

Standard
Node.js

Mac – How to install npm

NPM

this is tool which help to install package for node.js.

following below steps.

# curl https://npmjs.org/install.sh | sudo sh
you can see below contents:

tar=/usr/bin/tar

version:
bsdtar 2.8.3 – libarchive 2.8.3
install npm@1.0
fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz
0.5.11-pre
1.0.106
cleanup prefix=/usr/local

All clean!

/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npm_g -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npm-g -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm@1.0.106 /usr/local/lib/node_modules/npm
It worked
Standard
Clojure

Clojure – 문서찾기

문서 찾기

doc

REPL 상태에서 쉽게 문서를 찾을 수 있다. 가장 많이 쓰이는 함수로 doc 함수를 아래와 같이 이용하면 된다.

(doc name)

find-doc 정확한 이름을 알지 못할 때 사용할 수 있는 검색 기능으로 find-doc을 사용할 수 있다.

첫번째 인자로 들어간 값으로 Regular expression이나 문자열에 포함되어 있다면 매치 된 결과를 보여준다.

(find-doc s)

 

Standard
Clojure

Clojure – 새로 시작하는 마음으로…

클로저 라이브러리에 대해서 알아보자.

클로저 코드는 Library처럼 패키지 되어 있다.

각각의 클로저 라이브러리는 네임스페이스로 되어있으며, Java 패키지와 유사한 구조로 되어있다.

만약 클로저에서 라이브러리를 호출하기 위해서 아래와 같이 사용할 수 있다.

(require quoted-namespace-symbol)

clojure.contrib.str-utils와 같은 패키지를 사용할 때

이는 clojure/contrib/str-utils.clj CLASSPATH에 위치하며 아래와 같이 사용할 수 있다.

(require 'clojure.contrib.str-utils)

Single quote(‘)는 꼭 필요하다.

Single quote는 Reader Macro의 의미를 가지며, 텍스트를 Clojure data structures로 변환하는 역할을 한다.

기본 폼에서 추가적으로 또한 클로저 리더는 리더 매크로를 구성한다.

리더 매크로는 앞 문자 케릭터로 부터 트리거를 발생시킨다?

대부분의 유사한 리더 매크로는 주석이다.

매크로 Character는 주석으로 작동되며 또한 세미콜론을 (;)의미한다.

또한 특수 리더로서 현 라인의 끝까지 모든 명령을 무시한다.

Require을 사용하지말고, Use!를 사용하자.

만약 Require을 사용한다면 네이스페이즈를 지정해주어야 한다.

refer

*refer*를 사용하면 지정된 네이스페이스 안에 있는 모든 아이템을 다 가져온다.

require 또는 use와 함께 강제적으로 모든 라이브러리를 다시 불러들이고 싶을때는

:reload-all 플래그를 사용할 수 있다.

만약 만드는 과정에서 라이브러리가 변경되거나 재시작 없이 정확한 값을 보기를 원한다면

:reload-all 플래그로 유용하게 사용할 수 있다.

 

 

 

Standard