$( "#startDt, #endDt" ).datepicker({

                 dateFormat: 'yy-mm-dd'

               , changeMonth: true

               , changeYear: true

               , nextText: '다음 '

               , prevText: '이전 '

               , showButtonPanel: true

               , beforeShow: function (input) {

                     setTimeout(function() {

                            var nextYearBtn = $("<button>이후 </button>");

                                 nextYearBtn.unbind("click").bind("click", function() {

                             $.datepicker._adjustDate($(input), +1, 'Y');

                                 });

                                 var preYearBtn = $("<button>이전 </button>");

                                 preYearBtn.unbind("click").bind("click", function() {

                             $.datepicker._adjustDate($(input), -1, 'Y');

                                 });

                                

                        $(".ui-datepicker-buttonpane")

                           .html('')

                           .append(nextYearBtn)

                           .append(preYearBtn);

                       }, 1);

               }

                    , onChangeMonthYear:function(y, m, i){                               

                           setTimeout(function() {

                                 var nextYearBtn = $("<button>이후 </button>");

                                 nextYearBtn.unbind("click").bind("click", function() {

                             $.datepicker._adjustDate($(i.input), +1, 'Y');

                                 });

                                

                                 var preYearBtn = $("<button>이전 </button>");

                                 preYearBtn.unbind("click").bind("click", function() {

                             $.datepicker._adjustDate($(i.input), -1, 'Y');

                                 });

                                

                        $(".ui-datepicker-buttonpane")

                           .html('')

                           .append(nextYearBtn)

                           .append(preYearBtn);

                       }, 1);

                 }

             });//.val(getFormatDate(new Date())) defaultDate : $(this).val()


Posted by 짱가쟁이
2014. 5. 29. 17:18

1. node.js 설치

- url : http://nodejs.org/ 

- 다운로드 받아서 인스톨

2. express 설치

- npm install -g express

- npm install -g express-generator

: Express 4.0.0 부터는 [express-generator] 설치해야 함.

        - 윈도우 : cmd창을 관리자 권한으로 실행


Posted by 짱가쟁이

window.open('','_self').close();

Posted by 짱가쟁이

1. META-INF/jboss-deployment-structure.xml 파일 생성(WEB-INF 에 생성해도 된다고 함)




2. 내용 추가

<?xml version="1.0" encoding="UTF-8"?>


<jboss-deployment-structure>

  <deployment>

    <exclusions>

        <module name="org.apache.log4j" />

        <module name="org.apache.commons.logging" />

        <module name="org.slf4j"/>

        <!--  

        <module name="org.jboss.logging"/>

        <module name="org.jboss.logging.jul-to-slf4j-stub"/>

        <module name="org.jboss.logmanager"/>

        <module name="org.jboss.logmanager.log4j"/>

        -->

    </exclusions>

  </deployment>

</jboss-deployment-structure>



Posted by 짱가쟁이

"01012341234" 형태로 저장된 전화번호를 "-" 구분자를 넣은 포맷으로 변경하고 싶을 때 정규식을 사용하면 편하게 개발이 가능하다.


1. 전화번호 포맷 변경

public static String makePhoneNumber(String phoneNumber) {

  String regEx = "(\\d{3})(\\d{3,4})(\\d{4})";

  

  if(!Pattern.matches(regEx, phoneNumber)) return null;

  

  return phoneNumber.replaceAll(regEx, "$1-$2-$3");

  

   }



2. 테스트

System.out.println(makePhoneNumber("01012341234"));

System.out.println(makePhoneNumber("0101231234"));


결과

010-1234-1234

010-123-1234



'java > util' 카테고리의 다른 글

[util] - 자바 문자열 압축/압축풀기  (0) 2011.11.14
[util] - 특정 디렉토리 파일 목록 출력하자.  (0) 2011.06.17
[InputStream] - String to InputStream  (1) 2010.10.13
[util] - byte to hex string  (0) 2010.09.07
[java] - replaceNull  (0) 2010.07.05
Posted by 짱가쟁이

select * from TABLE

where REG_DTS between DATEADD(MONTH, -1, GETDATE()) and GETDATE()

Posted by 짱가쟁이

2012년 1월 데이터 조회 시 사용


select * from TABLE

where convert(char(7), REG_DTS, 120) = '2012-01'

Posted by 짱가쟁이


httpd -k start 로 실행하면 접근되는 폴더가 apachectl start로 실행하면 접근이 안된다 싶을 때 아래의 명령어 실행

chcon 은 리눅스에서 디렉토리 접근가능하게 만든다고 함.


문제는 SELINUX 라는 보안 강화 프로그램 문제였음. Cent)S 4.2Final 부터 작동한다고 하는데, 저넘 때문에 chmod 명령을 사용해서  권한을 755를 줘도 디렉토리에 접근하지 못한거였음. 아래는 보안문맥을 지정해주는 명령어라고  함. 자세한 내용은 내두 모름 ㅡㅜ;


chcon -R -t httpd_user_content_t /home/www

'LINUX' 카테고리의 다른 글

공인 IP 확인  (1) 2018.09.07
버전, 비트 확인하기  (0) 2012.09.24
자바 프로세스 종료  (0) 2012.08.27
[RPM] - 명령어 정리  (1) 2012.08.06
ssh 연결방법  (0) 2012.08.06
Posted by 짱가쟁이

select cast(stuff(stuff(stuff('20121030132410', 9, 0, ' '), 12, 0, ':'), 15, 0, ':') as datetime) as date

Posted by 짱가쟁이
2012. 9. 24. 14:02

1. OS 이름 확인

[root@localhost /]# cat /etc/issue

CentOS release 6.3 (Final)

Kernel \r on an \m


[root@localhost /]# cat /etc/issue.net 

CentOS release 6.3 (Final)

Kernel \r on an \m


[root@localhost /]# cat /etc/redhat-release 

CentOS release 6.3 (Final)



2. OS 버전 확인

[root@localhost /]# uname -a

Linux localhost.localdomain 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


[root@localhost /]# cat /proc/version 

Linux version 2.6.32-279.5.2.el6.x86_64 (mockbuild@c6b10.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Aug 24 01:07:11 UTC 2012


[root@localhost /]# cat /etc/rc.sysinit | grep PRODUCT=

PRODUCT=$(sed "s/Red Hat \(.*\) release.*/\1/" /etc/system-release)

PRODUCT=$(sed "s/Fedora \(.*\) \?release.*/\1/" /etc/system-release)

PRODUCT=$(sed "s/CentOS \(.*\) \?release.*/\1/" /etc/system-release)

PRODUCT=$(sed "s/ release.*//g" /etc/system-release)

 

3. Bit 확인

[root@localhost /]# getconf LONG_BIT

64  

'LINUX' 카테고리의 다른 글

공인 IP 확인  (1) 2018.09.07
[httpd] - 디렉토리 권한 문제  (3) 2012.11.09
자바 프로세스 종료  (0) 2012.08.27
[RPM] - 명령어 정리  (1) 2012.08.06
ssh 연결방법  (0) 2012.08.06
Posted by 짱가쟁이
이전버튼 1 2 3 4 5 6 7 ··· 22 이전버튼