1. 피하지 말고 맞서라 파워게임을 피하기보다는 맞서면 자신에게 유리해 질 수도 있습니다. 2. 주위사람들을 바르게 대우해주자 사내정치에서 유리하려면 상대방을 모두 자기편으로 만들면 됩니다. 강압적으로 우리편에 끌어들이면 후환이 생길 수 있습니다. 비록 적이라도 그의 가치를 인정하고 존중해주면서 신뢰를 얻을 수 있다면 최소한 위협이 되지는 않을 것입니다. 3. 내편을 놓치지 말자 내 편인 사람이 떠나지 않게 하려면 나를 도와줄 때마다 평가해주고 보답해야 합니다. 상대방도 자신을 인정해주고 있다고 느낀다면 더 많은 도움을 줄 것입니다. 4. 성실해야 한다 자신이 성실하다는 것을 어필하려면 거짓말을 안 하고, 간사하지 않다는 사실도 증명해야하는 것은 물론이고 그 이상의 무엇을 반드시 행동으로 보여줘야 합니다. 성실함이 증명된다면 당신을 인정하고 신뢰하는 사람이 점점 많아질 것입니다. 5. 진실만을 추구한다 만일 당신에게 권력이 생긴다면 주위에 다양한 사람이 운집할 것입니다. 소인배, 간신배도 예외는 아니지요. 그들이 당신의 눈과 귀를 막을 수 있게 방치해서는 안 됩니다. 특히 권력의 중심에 서게 되면 듣기 좋은 말을 가려내고 진실을 가려낼 수 있는 능력을 반드시 터득해야 합니다. 6. 시종일관 성실함을 잃지 말자 파워게임에서 승리해도 성실함을 잃으면 안 됩니다. 꾸준히 진실되고 성실한 자세로 매사에 임하면 많은 사람들의 신임을 계속 받을 것입니다. 7. 적에게도 진실된 대응을 한다 자기에게 반대하는 사람들에게도 열린 자세로 대하고 포용해준다면 의외로 내 편이 되어줄 수도 있습니다. 8. 외부의 의견도 듣는다 자기에게 모여드는 사람은 비록 숫자가 매우 많아져도 신념이나 의견이 매우 비슷한 경향이 대부분일 것입니다. 시간이 지나면서 집단에서 점점 발전이 없어지는 과정을 밟을 확율이 높아지지요. 가끔은 외부의 다른 의견, 신선한 의견을 경청하는 것이 좋습니다. 9. 술자리같은 단합모임을 자주 마련하자 지위고하를 막론하고 서로 자유롭게 토론하고 의견도 피력하며 우의도 증진할 수 있는 자리를 마련하는 것은 중요합니다. 특히 격식이나 예의를 파괴하면서 후배들을 모두 끌어안는 모습도 보여야 합니다. 10. 난국은 함께 헤쳐나간다 고난이 닥치면 그 사람의 본모습을 볼 수 있습니다. 팀이 힘들거나 동료가 어려울 때 격려하면서 함께 난국을 헤쳐나간다면 인심을 얻고 능력을 인정받을 것입니다. 번역 원문 : http://blog.naver.com/personajo/50097786207 원문 : http://www.lifehacker.jp/2008/11/syanai_seiji_10.html [출처] 사내정치에서 살아남는 10가지 법칙 |작성자 Ko원장 |
'2011/03'에 해당되는 글 6건
- 2011/03/31 사내정치에서 살아남는 10가지 법칙
- 2011/03/25 Firefox4 vs Chrome 12.0.712.0 vs Internet Explorer 9
- 2011/03/25 CGLIB is required to process @Configuration classes
- 2011/03/24 PHP를 이용한 Comet 서버 채팅 예제 (2)
- 2011/03/18 jQuery AOP 플러그인
- 2011/03/04 Zend Framework 상에서 application.ini 설정값 가져오기
Posted on 2011/03/31 15:33
Filed Under It's my life
Posted on 2011/03/25 18:27
Filed Under Development/HTML/Javascript
| 파이어폭스4도 나왔고 해서 이쯤에서 최신 브라우저들 자바스크립트 성능을 비교해 봤습니다. 자바스크립트 성능 테스트 사이트 : http://www.webkit.org/perf/sunspider/sunspider.html 여전히 크롬이 빨랐고 파폭도 많이 빨라졌고 IE는 매우! 빨라졌다 =_= Firefox 4.0
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 282.3ms +/- 1.8%
--------------------------------------------
3d: 37.0ms +/- 1.6%
cube: 14.4ms +/- 3.5%
morph: 7.0ms +/- 4.8%
raytrace: 15.6ms +/- 3.9%
access: 41.1ms +/- 4.1%
binary-trees: 9.7ms +/- 3.6%
fannkuch: 18.7ms +/- 4.0%
nbody: 6.0ms +/- 5.6%
nsieve: 6.7ms +/- 13.4%
bitops: 17.7ms +/- 5.4%
3bit-bits-in-byte: 0.8ms +/- 37.7%
bits-in-byte: 9.6ms +/- 5.2%
bitwise-and: 1.9ms +/- 11.9%
nsieve-bits: 5.4ms +/- 6.8%
controlflow: 12.1ms +/- 3.4%
recursive: 12.1ms +/- 3.4%
crypto: 23.2ms +/- 2.8%
aes: 10.0ms +/- 4.8%
md5: 8.2ms +/- 3.7%
sha1: 5.0ms +/- 0.0%
date: 44.4ms +/- 3.7%
format-tofte: 26.3ms +/- 4.8%
format-xparb: 18.1ms +/- 3.9%
math: 26.1ms +/- 4.9%
cordic: 7.1ms +/- 7.4%
partial-sums: 9.9ms +/- 6.3%
spectral-norm: 9.1ms +/- 2.5%
regexp: 12.7ms +/- 2.7%
dna: 12.7ms +/- 2.7%
string: 68.0ms +/- 2.1%
base64: 4.2ms +/- 7.2%
fasta: 12.3ms +/- 3.9%
tagcloud: 20.9ms +/- 1.9%
unpack-code: 22.4ms +/- 3.1%
validate-input: 8.2ms +/- 5.5%
Chrome 12.0.712.0
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 235.6ms +/- 2.1%
--------------------------------------------
3d: 32.5ms +/- 9.2%
cube: 10.0ms +/- 22.1%
morph: 11.2ms +/- 14.4%
raytrace: 11.3ms +/- 11.9%
access: 28.6ms +/- 11.9%
binary-trees: 2.0ms +/- 0.0%
fannkuch: 19.1ms +/- 16.8%
nbody: 4.9ms +/- 10.8%
nsieve: 2.6ms +/- 14.2%
bitops: 24.7ms +/- 9.8%
3bit-bits-in-byte: 2.0ms +/- 0.0%
bits-in-byte: 6.0ms +/- 9.7%
bitwise-and: 8.8ms +/- 3.4%
nsieve-bits: 7.9ms +/- 29.1%
controlflow: 3.0ms +/- 0.0%
recursive: 3.0ms +/- 0.0%
crypto: 21.2ms +/- 2.1%
aes: 7.7ms +/- 4.5%
md5: 6.9ms +/- 3.3%
sha1: 6.6ms +/- 5.6%
date: 21.1ms +/- 3.0%
format-tofte: 8.9ms +/- 2.5%
format-xparb: 12.2ms +/- 3.7%
math: 24.0ms +/- 6.4%
cordic: 5.0ms +/- 36.9%
partial-sums: 12.8ms +/- 8.2%
spectral-norm: 6.2ms +/- 4.9%
regexp: 9.7ms +/- 3.6%
dna: 9.7ms +/- 3.6%
string: 70.8ms +/- 1.7%
base64: 4.3ms +/- 8.0%
fasta: 12.4ms +/- 6.2%
tagcloud: 17.3ms +/- 2.8%
unpack-code: 25.1ms +/- 2.1%
Internet Explorer 9
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 976.8ms +/- 0.6%
--------------------------------------------
3d: 141.9ms +/- 1.7%
cube: 55.6ms +/- 3.1%
morph: 28.0ms +/- 2.4%
raytrace: 58.3ms +/- 0.8%
access: 196.7ms +/- 1.2%
binary-trees: 28.4ms +/- 1.3%
fannkuch: 85.2ms +/- 1.2%
nbody: 61.5ms +/- 2.1%
nsieve: 21.6ms +/- 1.7%
bitops: 160.7ms +/- 0.9%
3bit-bits-in-byte: 39.7ms +/- 1.5%
bits-in-byte: 39.2ms +/- 1.2%
bitwise-and: 42.8ms +/- 0.7%
nsieve-bits: 39.0ms +/- 1.5%
controlflow: 38.2ms +/- 1.2%
recursive: 38.2ms +/- 1.2%
crypto: 100.7ms +/- 0.8%
aes: 32.9ms +/- 1.6%
md5: 32.4ms +/- 1.1%
sha1: 35.4ms +/- 1.0%
date: 62.4ms +/- 2.1%
format-tofte: 30.8ms +/- 2.1%
format-xparb: 31.6ms +/- 2.7%
math: 103.3ms +/- 1.5%
cordic: 13.4ms +/- 2.8%
partial-sums: 51.2ms +/- 2.2%
spectral-norm: 38.7ms +/- 2.0%
regexp: 6.4ms +/- 5.8%
dna: 6.4ms +/- 5.8%
string: 166.5ms +/- 1.2%
base64: 26.6ms +/- 1.9%
fasta: 43.1ms +/- 1.8%
tagcloud: 37.6ms +/- 1.8%
unpack-code: 29.4ms +/- 1.7%
validate-input: 29.8ms +/- 1.5%
|
Posted on 2011/03/25 00:46
Filed Under Spring
토비의 스프링3 책과 함께 연습중 어플리케이션 컨텍스트를 적용하니 바로 다음과 같은 예외가 발생했다. Exception in thread "main" java.lang.IllegalStateException: CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [daoFactory] pom.xml 에 다음과 같이 기술해주어 해당 라이브러리를 다운받아야 한다. <!-- cglib --> <dependency> <groupId>com.kenai.nbpwr</groupId> <artifactId>net-sf-cglib</artifactId> <version>2.1.3-201003011305</version> </dependency> |
Posted on 2011/03/24 16:09
Filed Under Development/PHP
| 이론적으로만 알았었지 실제로 어떻게 동작하는지 써본적이 없었는데 이번 기회에 정리! 원문 : http://www.zeitoun.net/articles/comet_and_php/start 위에 소스는 Prototype 을 이용하는지라 jQuery 버전으로 다시 작성, chat-with-comet.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chating</title>
<script type="text/javascript" src="https://www.google.com/jsapi">
</script>
<script type="text/javascript">
google.load("jquery", "1.5");
</script>
<!-- Framework CSS -->
<link rel="stylesheet" href="blueprint/screen.css" type="text/css"
media="screen, projection">
<link rel="stylesheet" href="blueprint/print.css" type="text/css"
media="print">
<link rel="stylesheet" href="blueprint/form.css" type="text/css"
media="screen">
<!--[if lt IE 8]>
<link rel="stylesheet" href="../blueprint/ie.css" type="text/css"
media="screen, projection">
<![endif]-->
</head>
<body>
<div id="content">
<div id="inputForm">
<fieldset class="info">
<legend>Comment</legend>
<input type="text" id="nickname" size="10"
value="takeone"/>
<input type="text" id="comment" size="100"/>
<input id="send-button" type="button" value="Send" />
</fieldset>
</div>
<div>
<fieldset class="success">
<legend>Comments</legend>
<div id="list"></div>
</fieldset>
</div>
</div>
<script type="text/javascript">
$(function() {
var timestamp = 0;
var noerror = true;
// 서버측 생성된 파일의 타임스탬프를 채크함
function connect() {
var comet = $.ajax({
url : 'chat-backend.php',
method : 'GET',
dataType : 'JSON',
data : {
timestamp : timestamp
},
success : function(response) {
if(response != null) {
timestamp = response['timestamp'];
$('#list').before('<div><span>' + response['nickname']
+ "</span> : " + response['comment'] + '</div>');
noerror = true;
}
},
complete : function(response) {
if (!noerror)
setTimeout(function(){ connect(); }, 5000);
else
connect();
noerror = false;
}
});
}
// 실제 내용을 서버쪽에 전달
$('#comment').keyup(function(e) {
if(e.keyCode == 13) {
$('#send-button').trigger('click');
}
});
$('#send-button').click(function() {
$.ajax({
url : 'chat-backend.php',
method : 'GET',
dataType : 'JSON',
data : {
nickname : $('#nickname').val(),
comment : $('#comment').val(),
timestamp : timestamp
},
success : function(response) {
$('#comment').val('');
},
complete : function(response) {
$('#comment').val('');
}
});
});
connect();
});
</script>
</body>
</html>
chat-backend.php
<?php
$filename = dirname(__FILE__) . '/comment.json';
$comment = isset($_GET['comment']) ? $_GET['comment'] : '';
if($comment != '') {
file_put_contents($filename, json_encode($_GET));
die();
}
$lastmodif = isset($_GET['timestamp']) ? $_GET['timestamp'] : 0;
$currentmodif = filemtime($filename);
while ( $currentmodif <= $lastmodif ) {
usleep(10000);
clearstatcache();
$currentmodif = filemtime($filename);
}
$response = json_decode(file_get_contents($filename), true);
$response['timestamp'] = $currentmodif;
echo json_encode($response);
flush();
이걸 어디다 써먹지=_= |
Posted on 2011/03/18 17:24
Filed Under Development/HTML/Javascript
| 최근에 스프링 관련 공부를 하더보니 자바스크립트에도 이런걸 보게 되는군요! 이 플러그인은 jQuery 플러그인으로 자바스크립트에 AOP 구현을 가능하게 해줍니다. 예를 들어
function actionOne(s) {
if(s == null) {
alert('Wrong String!!');
return false;
}
if(s.length == 0) {
alert('Wrong String!!');
return false;
}
return s;
}
function actionTwo(s) {
if(s == null) {
alert('Wrong String!!');
return false;
}
if(s.length == 0) {
alert('Wrong String!!');
return false;
}
return s.toLowerCase();
}
function actionThree(s) {
if(s == null) {
alert('Wrong String!!');
return false;
}
if(s.length == 0) {
alert('Wrong String!!');
return false;
}
return s.toUpperCase();
}
위와같은 코드가 있을경우 모든 함수에서 공통으로 받은 문자열을 체크하는 루틴이 있습니다. 기존의 방식대로라면 해당 부분을 따로 함수로 빼서 모든 부분에 각각 넣어줄수 있겠지만 jQuery 의 AOP 플러그인을 이용하면 다음과 같이 간결하게 바꿀수 있습니다. jQuery.aop.before( {target: window, method: 'action*'},
function(args) {
console.log('apo before ' + args[0]);
if(args[0] == null) {
alert('Wrong String!!');
return false;
}
if(args[0].length == 0) {
alert('Wrong String!!');
return false;
}
}
);
function actionOne(s) {
return s;
}
function actionTwo(s) {
return s.toLowerCase();
}
function actionThree(s) {
return s.toUpperCase();
}정의된 함수 action* (정규식이 적용됩니다.) 들이 실행되기전에(before) 가장 처음 정의된 함수를 실행해라 라고 명확하게 지정하여 사용할수 있습니다. 자바스크립트에서 AOP 흉내를 낼수 있다는 점이 흥미롭기는 하지만 역시나 AOP 로 되어있는걸 모르는 사람이 봤을때는 도데체 어디서 코드가 실행된건지 전혀 알수 있는 방법이 없습니다. 문서화가 명확하게 되어있어야 할듯... 관련링크김제준 님의 글 http://starplatina.tistory.com/241 jQuery-aop http://code.google.com/p/jquery-aop/ |
Posted on 2011/03/04 09:51
Filed Under Development/PHP
컨트롤러 상에서
public function someAction()
{
$bootstrap = $this->getInvokeArg('bootstrap');
$options = $bootstrap->getOptions();
}
컨트롤러 밖에서
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
$options = $bootstrap->getOptions();
레지스트리로 등록하기
protected function _initConfig()
{
$config = new Zend_Config($this->getOptions());
Zend_Registry::set('config', $config);
return $config;
}
|
chat-comet.zip