시스템 구조를 제안할때 인위적인 CPU 부하 발생이 요구되는 경우가 있다.


단계별로 부하가 증가함을 보이고 싶을때 Linux stress와 같은 응용은 특정 코어의 부하를 100%으로 만들기때문에


적용이 난감하다.


이경우 https://github.com/ptitiano/cpuloadgen 를 쓰면 특정 코어에 데해 자신이 원하는 퍼센테이지만큼의 부하를 가할 수 있다.

설정

트랙백

댓글

You can create an array object of user collection as

var users = {};

then on server side you can add it as new user when you connect

socket.on('new-user', function (username) {
    users[username] = username;
});

while displaying the users, you can loop the "users" object

On Client side

var socket = io.connect();

socket.on('connect', function () {
    socket.emit('new-user', 'username');
});



http://stackoverflow.com/questions/18093638/socket-io-rooms-get-list-of-clients-in-specific-room

설정

트랙백

댓글

 맥을 사용할경우 맥에서 멜론을 돌릴 방법이 없기때문에

블루스택이나 버추얼박스를 이용한다.

블루스택이 좋긴한데,,, 너무 느려서 버추얼박스를 이용한다.

버추얼박스로는 이상하게 멜론 태블릿 버전은 재생이 되지만

스마트폰용은 재생이 되질 않는다.

아마 캐싱문제인듯 싶고, 설정에가서 해당 설정을 해제하면 재생되는것을 확인할 수 있다.



설정

트랙백

댓글

매트랩 활용

病身力 2014. 6. 6. 15:20


http_createHeader.m


http_paramsToString.m


license.txt


urlread2.m


urlread_notes.txt


urlread_todos.txt


urlread_versionInfo.txt



 매트랩이 json읽어오고, RESTful로 메시지도 보낼수 있더라 ㅡㅡ;;


nodejs상에서 hilbert transform하고 연산하기가 힘들었는데


걍 단순하게 한 서버상에서 매트랩하고 nodejs를 돌려서 해결하였다.


매트랩에 딱 명령내릴 방법이 없는거 같아서


매트랩이 2초마다 json메시지가 있나 확인하고 있으면 연산후

서버에 RESTful로 연산끝났음을 알리고 서버로 전송할 json메시지를 만든다

그럼 서버가 그걸 읽으면 된다. 

설정

트랙백

댓글

MouseOver MouseLeave Event

JS 2014. 5. 21. 20:02

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
    <head>
        <title>hello</title>
        <script src='./js/jquery-1.11.1.js'></script>
        <script src='./js/ch15.js'></script>
        <link rel='stylesheet' href='./ui-lightness/jquery-ui-1.10.4.css' />
        <style>
            .reverse {
                color: white;
                background-color: black;
}
        </style>
        <script src='./js/jquery-ui-1.10.4.min.js'></script>
 
        <script>
            $(document).ready(function() {
                $('div').hover(function(){
                    
                    $(this).addClass('reverse',500);
                    
                }, function(){
                    $(this).removeClass('reverse',500);
                    var temp = this;
                    setTimeout(function(){
                        $(temp).clearQueue();
                    },500);
                });
            }); //ready
        
        </script>
    </head>
    <body>
        <div>
            <h1>fuckfuck</h1>
            <p>fuckfuck</p>
        </div>
        <div>
            <h1>fuckfuckc</h1>
            <p>fufufufuckfuc</p>
        </div>
        <div>
            <h1>fuckfuck</h1>
            <p>fukcufkcu</p>
        </div>
    </body>
</html>
 


설정

트랙백

댓글