2015년 7월 3일 금요일

[불교] 합장과 절의 의미

열 손가락을 가지런히 하여 가슴 정중선을 향해 손바닥을 합치는 것을 합장이라고 한다.

합장이 왜 좋을까? 마음을 통일시키는 점도 좋고 양손을 합치면 흔히 호기(좋은 기)가 나오니 좋다. 합장은 경건하고 공손할 뿐만 아니라 진리를 참구하겠다는 결의이기도 해 발심의 불을 붙인다.

이렇게 합장하고 큰절을 하는데, 절을 할 때는 두 무릎을 구부리며 먼저 오른손을 놓고 다음 왼손을 짚어 그 사이로 이마를 닿게 한다. 그러나 우리 재가자는 가사를 입지 않으므로 두 무릎을 꿇은 다음 두손을 동시에 짚어도 무방하리라고 본다. 이때 발바닥은 왼쪽 발바닥을 오른쪽 발바닥 위로 X형으로 포개 놓는다. 이 때 주의할 점은 엉덩이를 치켜들지 말아야 한다는 것이다.

그 다음 손바닥을 뒤집어서 귀 높이로 올린다. 이것을 ‘접족례'라 한다. 부처님의 발을 내가 받드는 모습이니 존경의 극치라고 할 수 있다. 그리고 절을 세 번 한 뒤 마지막 절만큼은 접족례에서 머리 윗쪽으로 손바닥만 합치는 것을 고두배(叩頭拜)라 한다.

고두배란 두드릴 고자에 머리 두자를 쓰니 ‘머리를 두드린다’, ‘머리를 찧는다’, ‘부처님의 발에 끊임없이 머리를 조아리며 가피를 구한다’는 뜻이다. 고두배를 한 다음 다시 접족례를 하고 역순동작 으로 일어서서 반배까지를 하게 된다.

합장과 큰절은 불교의식의 기본에 해당한다. 큰절을 일명 오체투지라 하는데 두 팔꿈치, 두 무릎, 그리고 머리까지 땅에 닿게 하여 신체의 다섯 부분이 다 땅에 닿는다는 말에서 비롯됐다.

법연 선사는 20년간 사력을 다해 공부하고 보니 비로소 자신이 부끄러운 줄 알았다고 했고 성철스님은 기자들이 묻는 질문에 ‘나는 못난 사람’이라며 스스로를 낮추는 하심의 모습을 보여 주셨다. 오체투지는 육신의 낮춤을 통해 마음을 낮추는 행이므로 절을 통해 하심의 도리를 자각해야 한다.

부처님전에서 큰절은 3배를 하는데 이는 삼보인 부처님께, 가르침에, 승가(사부대중)에 각각 절을 올리는 의미를 갖는다. 그러나 스승님(스님, 법사)에게는 1배가 좋다.

법당에 들면 맨 먼저 부처님께 반배를 올리고 3배를 올리기 전 법단 향합(향을 꼽는 통)에서 향을 뽑는데 향을 잡을 땐 향 가운데를 잡는다. 그리고 뽑아든 향을 촛불에다 붙일 때 왼손으로 오른손을 받쳐든다. 이어 향을 이마 높이까지 올려서 마음 속에서 “부처님 올립니다.”라고 말한 다음 향로에 꼽는다. 이것이 향 공양의 방법이다.

보통 법당에선 향공양을 올리고 3배를 하는 것이 기본 절차다. 불자들이 올리는 공양물은 여섯가지가 있는데 앞서 말한 향공양 등공양, 꽃, 과일, 다공양, 미공양이 그것이다. 이것을 육법공양이라고 한다. 다 한결같이 예경과 베품의 실천이며 그 내용에 따라서 과복을 받는 인과를 중시한다.

2015년 4월 13일 월요일

[Linux] httpd Service Config - Memo

# httpd -v
# httpd 2.2.14

# php -v
# php 5.3

# chcon -R -t httpd_user_content_t /home/mfg

# vi /etc/selinux/config
#SELINUX=enforcing
SELINUX=disabled
SELINUXTYPE=targeted



ServerName app.madforgarlic.com
ServerAdmin mfg@madforgarlic.com
DocumentRoot "/home/mfg/www"
Alias /media "/home/mfg/media"
<Directory />
 Option FollowSymLinks
 AllowOverride FileInfo
 Order allow,deny
 Allow from all
</Directory>



## Oracle Client
rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm


## PHP 컨피그 설치 다시

** DB Pool 정보 확인
https://github.com/jjang9b/CodeIgniter_sqlrelay

[Linux] Basic Command - tar


[root@test /]> tar cvf  FileNames.tar FolderNames[root@test /]> tar cvfz FileNames.tar.gz FolderNames[root@test /]> tar cvfz FileNames.tar FolderNames

[root@test /]> tar xvfz FileNames.tar.gz
[root@test /]> tar xvf FileNames.tar

2015년 1월 29일 목요일

[Windows 7] ODBC 설정시 Oracle Driver 설정 방법

과거 응용프로그램들 또는 설정을 해야 하는 경우가 간혹 발생을 하게 되는데 Windows7을 사용하지만 잘 알지 못하는 경우가 대부분이다.

평상시 처럼 제어판에 있는 ODBC를 열고나서 설정해야지 했더니 보이지 않는다. 앗 뭐지 잠시 생각하다가 뭔가 분명 32Bit와 64비트의 차이가 있을 것이다라는 흠짓한 생각들이 들면서 알게된 내용 누군가를 위하다기 보다는 내 스스로가 또 지나면 잊어 버릴 듯 하여 남겨 놓는다.

Oracle ODBC 드라이버가 32 Bit 이기 때문입니다. 따라서 "데이터 원본(ODBC)"을 32bit 모드로 실행을 하면 사용이 가능 하다.

1. Run CMD

2. C:\>%systemroot%\SysWOW64\odbcad32.exe  Enter

3. 뭐 나머지야 설정 하면 되겠지?

<< 오늘도 이래저래 주저리 주저리 궁시렁 궁시렁... 삽질 하지 않는 그날까지.>>

2015년 1월 26일 월요일

[Power Builder] datawindow.Update() option Example

오랜시간 PowerBuilder 사용하고 있으나 실상을 뒤집어 보면 아는게 별로 없는 허접한 개발자 맞다. 이제서야 정확한 이 옵션의 의미를 이해 했다는 것은 편의성이 가져다 주는 오만함을 심어 줬던것은 아니었을까. 역시나 내 무식함을 오늘도 한번 다시 느낀다.

Reference URL
http://infocenter.sybase.com/archive/index.jsp?topic=/com.sybase.help.pb_10.5.pbug/html/pbug/BHBHDIEG.htm


Example
Consider this situation: a DataWindow object is updating the Employee table, whose key is Emp_ID; all columns in the table are updatable. Suppose the user has changed the salary of employee 1001 from $50,000 to $65,000. This is what happens with the different settings for the WHERE clause columns:

If you choose Key Columns for the WHERE clause, the UPDATE statement looks like this:

UPDATE Employee
SET Salary = 65000
WHERE Emp_ID = 1001
This statement will succeed regardless of whether other users have modified the row since your application retrieved the row. For example, if another user had modified the salary to $70,000, that change will be overwritten when your application updates the database.

If you choose Key and Modified Columns for the WHERE clause, the UPDATE statement looks like this:

UPDATE Employee
SET Salary = 65000
WHERE Emp_ID = 1001
   AND Salary = 50000
Here the UPDATE statement is also checking the original value of the modified column in the WHERE clause. The statement will fail if another user changed the salary of employee 1001 since your application retrieved the row.

If you choose Key and Updatable Columns for the WHERE clause, the UPDATE statement looks like this:

UPDATE Employee
SET Salary = 65000
WHERE Emp_ID = 1001
   AND Salary = 50000
   AND Emp_Fname = original_value
   AND Emp_Lname = original_value
   AND Status = original_value

2015년 1월 14일 수요일

[Struts 2] Web Application - Getting Started

#과거 2004년도에 초기 Struts 1.3 버전 때 개발을 주로 하다가 프로그래밍 안한지 6년 7년 만에 필요한 것이 있어서 다시 시작하려니 이미 많은 부분이 바뀌어서 간단하게 만드는 부분이니 Struts 을 찾아 보다 또 버전이 업그레이드 되었다.

# 간략하게 정리 하면서 샘플을 만들어 봤다. 혹 나와 같은 사람이거나 새롭게 접근하는 친구들이 있다면 도움이 될지 모르겠다.

# 그러나, 개략적인 설명의 대부분은 기존 Struts 1을 경험한 사람을 위주로 하였음을 미안하게 생각한다. 또는 기존에 Web 관련 개발을 해본 친구들이라면 함께 이해하고 넘어가는데 큰 어려움이 없을것으로 생각된다.


[이미지출처 - 스프링3입문]

위 사진은 전반적인 구성을 보여주고 있다. 브라우저에서 요청이 들어 오면 일단 프론트 컨트롤러가 받아서 공통된 처리를 시행하면서 개별 처리와 뷰를 호출하는 구조로 되어 있다. 개별처리 부분에선 데이터에 대한 모델이 필요한 경우 참조하게 된다. 이구성은 기존의 Struts1 과도 동일하다는 것을 알 수 있다.

단지 차이가 좀 있다면 기존의 Struts1 에서는 로그인이나 입력되는 Form 관련 페이지에서 Form 값을 받아 주는 ActionForm 클래스를 상속받아서 처리 해줘야 하는 번거로움이 있었다. 그런데 버전 2.0 대에 오면서 이 부분이 없어졌다.



[이미지출처 - 스프링3입문]




# 실행을 위한 사전 준비사항

1) web.xml파일 설정
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="2.5">
    <display-name>inv</display-name>

    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
 
    <resource-ref>
        <res-ref-name>jdbc/myoracle</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

2) Action 설정
import org.apache.struts2.dispatcher.SessionMap;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import Resource;
import User;
import HrInfoService;
import HrInfoServiceImpl;
public class LoginAction extends ActionSupport  implements Preparable {
private static final long serialVersionUID = 9149826260758390091L;
private User user;
private Resource resource;
private HrInfoService hrInfoService;
private String id;
private String password;
private String companyName;

public void prepare() {
resource = new Resource();
resource.setDriver(getText("driver"));
resource.setUrl(getText("url"));
resource.setUsername(getText("username"));
resource.setPassword(getText("password"));

hrInfoService = new HrInfoServiceImpl();
}
public String loginForm() {
return SUCCESS;
}

public String login() throws Exception {
User user = new User();
user.setId(this.id);
user.setPassword(this.password);
User isValidLogon = hrInfoService.authenticateLogin(resource, user);

if (isValidLogon != null) {
String id = isValidLogon.getId();

@SuppressWarnings({ "rawtypes", "unchecked" })
SessionMap<String, String> session = (SessionMap) ActionContext.getContext().getSession();
session.put("userId", id);
session.put("companyName", companyName);
return SUCCESS;
} else {
addActionError("Incorrect ID or password");
return INPUT;
}
}

// ---------------------------- Log Out register user
public String logOut() {
@SuppressWarnings("rawtypes")
SessionMap session = (SessionMap) ActionContext.getContext().getSession();
session.remove("userId");
addActionMessage("You Have Been Successfully Logged Out");
return SUCCESS;
}
public void setuser(User user) {
this.user = user;
}
public User getUser() {
return user;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}

3) JSP 페이지 설정
<%@ page contentType="text/html; charset=UTF-8"%>
<!doctype html>
<html lang="ko">
<head>
<title>SUNATFOOD - Purchase</title>
<link rel="stylesheet" href="css/baseStyle.css" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body >
<header>
<hgroup>
<h1>Example</h1>
</hgroup>
</header>
<nav>
<ul>
<li><a href="index.jsp">Home</a></li>
<li><a href="#">About Us</a></li>
</ul>
</nav>

<article>
<section>
<header>
<h1>Beta Test HTML5 적용 (크롬브라우저 사용 권장 최적화) </h1>
</header>
<form action="/login.action" method="post">
<label for="id">LogIn ID:</label>
<input type="text" required name="id" id="id" placeholder="Enter your id" autofocus><br />
<label for="password">LogIn Password:</label>
<input type="password" required name="password" id="password" placeholder="Enter your password"><br />
<input type="submit" value="LOG-IN">
</form>
</section>

</article>

<footer>
<p>&copy; **** All rights reserved.</p>
</footer>
</body>
</html>


4) struts.xml 작성
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default" namespace="/">      
<!-- Login Action -->
<action name="loginForm" class="saf.hr.action.LoginAction" method="loginForm">
<result name="success">/index.jsp</result>
</action>
<action name="login" class="saf.hr.action.LoginAction" method="login">
<result name="success" type="redirect">/getPayInfoList.action</result>
<result name="input">/index.jsp</result>
</action>
<action name="logOut" class="saf.hr.action.LoginAction" method="logOut">
<result name="success" type="redirect">/loginForm.action</result>
</action>
</package>
</struts>



언제 부터 였던가 생각해보니 아르바이트 겸 외부 컨설팅을 의뢰 받고 맥북 프로를 처음 써봤을 때 부터 였던 것 같다. 지금은 거의 대부분의 작업을 맥으로 작업을 하다 보니 윈도우에서만 실행되는 일부 프로그램들 때문과 회사 내부 ERP프로그램이 윈도우 ...