A (1, 1)
B (1, 0)

1. A outer product B
| 1 0 |
| 1 0 |

2. |A cross product B| => determinant
|ab -bc| => |1 * 0 - 1 * 1| = |-1|

보통 흔히 말하는 A와 B가 이루는 면적은 cross product의 크기가 된다. outer product와는 관련이 없다.
그리고 A,B 가 이루는 면은 삼각형이 아니라 평행 사변형이다.

참고로, cross product는 determianat 계산법으로 계산이 된다.
https://en.wikipedia.org/wiki/Cross_producthttps://en.wikipedia.org/wiki/Determinant

 

 

Cross product - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search Mathematical operation on two vectors in three-dimensional space In mathematics, the cross product or vector product (occasionally directed area product to emphasize the geometric sign

en.wikipedia.org

| i  j  k|
| a b c|
| d e f| 로 두고, determinant를 구하면 i(bf - ce) - j(af - cd) + k(ae-bd) 가 되고 각각의 괄호안에 있는 값이 바로 i, j, k가 된다.

det를 구하는 방법의 원리는 아래 링크에서 라플라스 전개를 보면 이해가 쉽다.
https://ko.wikipedia.org/wiki/%ED%96%89%EB%A0%AC%EC%8B%9D

블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

랜덤라이프! 안드로이드 랜덤 보이스 채팅/문자 채팅

안녕하세요. 신박한 랜덤 보이스 채팅을 소개해 드립니다.
주요기능으로는 보틀메시지, 쪽지, 보이스 채팅, 문자 채팅이 있습니다.

보틀 메시지는 바다에 둥둥 떠서 오는 병에 담겨있는 설레이는 메시지를 착안하여 만들어 졌습니다.
보이스 채팅은 무작위로 다른사람과 매칭이 되어 보이스 톡을 할 수 있는 기능입니다. 가끔 외국인도 만나서 영어 프리토킹 연습을 해볼 수 있습니다.
문자 채팅은 역시 무작위로 다른사람과 매칭이 되어 문자 톡을 할 수 있는 기능입니다.
쪽지는 보틀 메시지의 답장 또는 보이스 채팅, 문자채팅중 상대방의 프로필 아이콘을 눌러서 개인적인 메시지를 보낼 수 있는 기능입니다.
(tip. 대화 종료후에도 계속 연락을 주고 받고 싶다면, 대화중 미리 쪽지를 하나 보내는 센스! 잊지마세요~!)

그럼 각 버튼별 기능이 어떻게 동작하는지 그림으로 봅시다.

그럼 이제 설레이는 보틀메시지 받으러 가볼까요?

구글 플레이 스토어 이동

'Released, Demo' 카테고리의 다른 글

[Demo] NFC 원격 주문 프로젝트  (0) 2014.08.06
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

Socket broken pipe

TCP/IP 2019. 2. 20. 19:18

보통 이런 에러가 나는경우는, 한쪽에서는 끊었는데 다른 한쪽에서 메시지를 보낸경우 이런 에러를 리턴하게 된다.


한쪽에서 먼저 끊은 이유야 여러가지겠지만, 


본인은 대량의 로드 테스트 클라이언트를 돌리고 있었고, 로직에서 커스텀 핑 체크를 하고있는데, 핑 패킷을 서버가 못받아서 서버에서 일방적으로 끊은 이유였다.


그런데 이 현상은 와이파이를 쓸때만 일어나고, 유선으로 하면 발생하지 않았다.


이유가 무엇일까?


와이파이 네트웤 속도가 느려서 로드 테스트를 돌리는 대량의 패킷들이 병목으로 쭉 쌓였다가 한방에 서버한테 넘어가는 것이다.


서버에서는 bufferevent_setwatermark 로 맥스 버퍼 사이즈를 정해놓고 있는데, 이 수치를 넘어가는 패킷들이 몰려오니까 나머지는 짤려서 패킷이 유실되는 경우가 발생하고 있던 것이다.


그래서 클라이언트는 아무리 핑을 보내도 서버가 받지 못해서 not alive 유저로 판단해서 끊어 버리기 때문에, 클라에서 다음 패킷을 보낼때 socket bronken pipe가 전달되었던 것이다.

'TCP/IP' 카테고리의 다른 글

sockaddr vs sockaddr_in  (0) 2015.08.01
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

solidity

function pay(address wallet) external payable {

  wallet.transfer(msg.value);


tronbox console

//sending 1TRX
tronbox(development)>Contract.deployed().then(function(instance){return instance.pay(wallet1, {from:wallet2, callValue:1e6})});



블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

rabbitmq

카테고리 없음 2018. 8. 14. 10:32

* How to make a daemon
https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-rabbitmq
- Problem: "Cluster member: Node statistics not available."
- Solution: 
rabbitmq-plugins enable rabbitmq_management


* How to remove all queues
- rabbitmqadmin -f tsv -q list queues name | while read queue; do rabbitmqadmin -q delete queue name=${queue}; done



* How to remove all exchanges

- rabbitmqadmin -f tsv -q list exchanges name | while read exchange; do rabbitmqadmin -q delete exchange name=${exchange}; done


* RabbitMq 1 Connection is used per one process

* RabbitMq 1 Channel is used per one thread. (If multi-thread tries to use one channel, channel and connection will be closed!)


블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

'ejabberd' 카테고리의 다른 글

[solution] ejabberd join_cluster no_ping error  (0) 2018.07.25
mod_pottymouth  (0) 2018.07.11
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

1. If you didn't open required ports,
    please check https://stackoverflow.com/questions/36862874/erlang-ejabberd-join-cluster-error-no-ping
    FIREWALL_WINDOW=4200-4210  in ejabberdctl.cfg setting is mandatory.


2. You already opened all required ports, but you are getting no_ping error,
    set hosts config. /etc/hosts -> add your ejabbered node hostname. (in my case, node1, node2)

ex)
...
node1    10.0.100.1
node2    10.0.100.2

How to set ejabberd cluster. step by setp

1. ejabberd.yml -> use same file config
2. ejabberdctl.cfg ->
  use same all but
  ERLANG_NODE=ejabberd@each-node-hostname
  FIREWALL_WINDOW=4200-4210

3. add node1, node2 on /etc/hosts
4. node1) ejabberdctl start
5. node2) ejabberdctl start
6. node2) ejabberdctl --no-timeout join_cluster 'ejabberd@node1'



'ejabberd' 카테고리의 다른 글

How to configure ejabberd web admin  (0) 2018.07.25
mod_pottymouth  (0) 2018.07.11
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

mod_pottymouth

ejabberd 2018. 7. 11. 17:06

It can be difficultly installed with https://github.com/processone/ejabberd-contrib/tree/master/mod_pottymouth


Instructions

mkdir -p $EJABBERD_HOME/erlang-lib/bitarray
cd $EJABBERD_HOME/erlang-lib/bitarray
clone https://github.com/ferd/bitarray git repo
run: /usr/lib/erlang/bin/escript rebar get-deps
run: /usr/lib/erlang/bin/escript rebar compile
run: /usr/bin/install -c -d /usr/local/lib/bitarray-1.0.0/ebin
run: /usr/bin/install -c -d /usr/local/lib/bitarray-1.0.0/priv
run: /usr/bin/install -c -m 644 ./ebin/bitarray.app /usr/local/lib/bitarray-1.0.0/ebin/bitarray.app
run: /usr/bin/install -c -m 644 ./ebin/bitarray.beam /usr/local/lib/bitarray-1.0.0/ebin/bitarray.beam 
run: /usr/bin/install -c -m 644 ./priv/bitarray.so /usr/local/lib/bitarray-1.0.0/priv/bitarray.so

What is $EJABBERD_HOME? default may be ~/ folder.
So, export EJABBERD_HOME=/user/yourhome
in bittarray/rebar.conf, change proper version 1.0 -> 1.2

And Let's get mod_pottymouth

mkdir -n ~/.ejabberd-modules/sources cd ~/.ejabberd-modules/sources git clone https://github.com/processone/ejabberd-contrib.git cd mod_pottymouth make sure ejabberd is running run: ejabberdctl module_install mod_pottymouth run: ejabberdctl restart module will be installed in: ~/.ejabberd-modules/mod_pottymouth

May be you cannot module_install mod_pottymouth

1. remove -include("ejabberd.hrl"). line of mod_pottymouth.erl

2. add this. end of mod_pottymouth.erl

mod_options(_) -> [{blacklists, []}, {charmaps, []}].

3. add this. end of mod_pottymouth.erl -export([ here]) 

mod_options/1


After this module_install mod_pottymouth will be work.

I created pull request about this. 
https://github.com/processone/ejabberd-contrib/pull/253

'ejabberd' 카테고리의 다른 글

How to configure ejabberd web admin  (0) 2018.07.25
[solution] ejabberd join_cluster no_ping error  (0) 2018.07.25
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

How to install Golang on centos

Go 2018. 4. 12. 11:36

$>wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz

$>sudo tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz

$>export PATH=$PATH:/usr/local/go/bin

$>go env
...

GOPATH="/home/centos/go"

...

$>mkdir /home/centos/go

$>cd /home/centos/go

$>mkdir src pkg bin

If you want,
you can add "export PATH=$PATH:/usr/local/go/bin" on ~/.bash_profile





'Go' 카테고리의 다른 글

How to run go app in heroku by your own project (with github)  (0) 2017.02.24
LITE IDE setup  (0) 2015.01.28
cannot download, $GOPATH not set  (0) 2015.01.28
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,