2012/01/17 15:45
select: function (newEvent_start, newEvent_end, allDay) {
               
var okToAdd = true;
                $
('#calendar').fullCalendar('clientEvents', function (event) {
                   
if ( (newEvent_start >= event.start && newEvent_end <= event.end) || // between
                         
(newEvent_start <= event.start && newEvent_end >= event.start) || // starts before, ends during
                         
(newEvent_start >= event.start && newEvent_start <= event.end && newEvent_end >= event.end)  // starts during, ends after
                       
)
                        okToAdd
= false;
               
});

               
if (okToAdd) {
                    calendar
.fullCalendar('renderEvent',
                   
{
                        title
: 'Title goes here',
                        start
: newEvent_start,
                       
end: newEvent_end,
                        allDay
: allDay
                   
},
                   
true
               
);
               
}
                calendar
.fullCalendar('unselect');
           
}
저작자 표시
Posted by WeAreK5 WeAreK5
2012/01/17 14:23
처음에 특정 페이지를 열었을 때, 어떤 url을 요청 했는데 권한이 없을 경우, 
로그인 하는 페이지로 이동 해야 하는데 url에 jsessionid가 붙엇 url을 못찾는다는 오류가 생긴다.

간단하게 disable-url-rewriting="true"를 http 태그에 설정 해 주면 발생 하지 않는다.
근데 스프링 문서서도 위 내용은 찾을 수 없다.

http://stackoverflow.com/questions/2291236/how-can-i-prevent-spring-security-from-appending-jsessionidxxx-to-login-redirec

여기서 내용을 찾았는데... 뭐 갸내들이 바빠서 문서 업데이트를 못했나 보다 -_-;;

출처 : http://starplatina.tistory.com/entry/시큐리티에서-url-에jsessionid가-붙을-때 
저작자 표시
Posted by WeAreK5 WeAreK5
2012/01/09 15:50

public static String getShortUrl()

{

ByteArrayOutputStream baos = new ByteArrayOutputStream();

        DataOutputStream dos = new DataOutputStream(baos);

        UUID uuid = UUID.randomUUID();

        String shortUrlKey = null;

        try 

        {

   dos.writeLong(uuid.getMostSignificantBits());

           String encoded = new String(Base64.encodeBase64(baos.toByteArray()), "ISO-8859-1");

           shortUrlKey = StringUtils.left(encoded, 5);

       

           //특수문자가 생성되면 랜덤으로 알파벳 소문자를 생성하여 처리 

           String match = "[^\uAC00-\uD7A3xfe0-9a-zA-Z\\s]";

           shortUrlKey =shortUrlKey.replaceAll(match, Character.toString(((char)((Math.random() * 26) + 97)))  );

        catch (IOException e) {

e.printStackTrace();

shortUrlKey = null;

        }

    return shortUrlKey;

}


저작자 표시
Posted by WeAreK5 WeAreK5
2011/11/29 15:28
mybatis-context.xml

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

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"

xsi:schemaLocation="http://www.springframework.org/schema/beans

  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

  http://www.springframework.org/schema/context

  http://www.springframework.org/schema/context/spring-context-3.0.xsd

  http://www.springframework.org/schema/tx

  http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">


<!-- //MySql -->

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">

<property name="driverClassName" value="${db.driverClassName}"/>

<property name="url" value="${db.url}"/>

<property name="username" value="${db.username}"/>

<property name="password" value="${db.password}"/>

<property name="maxActive" value="20"/>

<property name="maxIdle" value="10"/>

    <property name="validationQuery" value="select 1"/>

</bean>



  <!-- 

  #####################################################

  # myBatis setting

  #####################################################

-->

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">

<property name="dataSource" ref="dataSource" />

<property name="configLocation" value="classpath:com/fcm/config/mybatis/mybatis-config.xml"/>

</bean>

<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

        <property name="dataSource" ref="dataSource"/>

    </bean>

    

<bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">

<constructor-arg ref="sqlSessionFactory"/>

</bean>

        <!-- 트랜젝션 사용시 필요함 -->

<tx:annotation-driven transaction-manager="transactionManager" />

</beans>

 

mybatis-config.xml

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

<!DOCTYPE configuration  

    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"  

    "http://mybatis.org/dtd/mybatis-3-config.dtd">  

     

    

<configuration>

 

<typeAliases>

<typeAlias alias="user" type="com.fcm.object.User" />        

    </typeAliases>

    

    

    

    <mappers>

     <mapper resource="com/fcm/config/mybatis/common.xml"/>

     <mapper resource="com/fcm/config/mybatis/event.xml"/>   

        <mapper resource="com/fcm/config/mybatis/template.xml"/>

        <mapper resource="com/fcm/config/mybatis/user.xml"/>

        <mapper resource="com/fcm/config/mybatis/channel.xml"/>

        <mapper resource="com/fcm/config/mybatis/article.xml"/>        

        <mapper resource="com/fcm/config/mybatis/magazine.xml"/>        

    </mappers>


</configuration>

 
저작자 표시
Posted by WeAreK5 WeAreK5
2011/11/25 11:51
Json를 다음과 같이 리털할 경우
{
   "page":"1",
   "total":2,
   "records":"13", 
   "user":[ 
      {"id":"12345","name":"Desktop Computers","email":"josh@josh.com","item":{"price":"1000.72", "weight": "1.22" }, "note": "note", "stock": "0","ship": "1"}, 
      {"id":"23456","name":"<var>laptop</var>","note":"Long text ","stock":"yes","item":{"price":"56.72", "weight":"1.22"},"ship": "2"},
      {"id":"34567","name":"LCD Monitor","note":"note3","stock":"true","item":{"price":"99999.72", "weight":"1.22"},"ship":"3"},
      {"id":"45678","name":"Speakers","note":"note","stock":"false","ship":"4"} 
    ] 
}

리스트를 표출하는 소스에서는  다음과 같이 처리함

jQuery(

function()

{

jQuery("#list2").jqGrid({

  url:'/admin/user/list/json',

datatype: "json",

jsonReader : { 

page: "page"

total: "total"

root: "user"

records: function(obj){return obj.length;},

repeatitems: false

id: "seq_user"

},

  colNames:['seq_user','Date', 'Client', 'Amount','name','Total','Notes'],

  colModel:[

  {name:'seq_user',index:'seq_user', width:55},

  {name:'invdate',index:'invdate', width:90},

  {name:'name',index:'invdate', width:100},

  {name:'amount',index:'amount', width:80, align:"right"},

  {name:'name',index:'name123123', width:80, align:"right"},

  {name:'total',index:'total', width:80,align:"right"},

  {name:'note',index:'note', width:150, sortable:false}

  ],

  rowNum:10,

  rowList:[10,20,30],

  pager: '#pager2',

  sortname: 'seq_user',

    viewrecords: true,

    sortorder: "desc",

    caption:"JSON Example"

});

jQuery("#list2").jqGrid('navGrid','#pager2',{edit:false,add:false,del:false});

}

);


 
저작자 표시
Posted by WeAreK5 WeAreK5
2011/11/16 19:40

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

<script type="text/javascript" src="/js/lib/jquery/jquery.cookie.js"></script>


<style type="text/css">

   /* 팝업 CSS */

   .popup { position: absolute; display: none; z-index: 1000; }

   .popup_bottom { float: left; height: 25px; font-size: 12px; font-family: "돋움", "굴림"; background: #000; }

   .popup_check { float: left; padding-top: 3px; padding-left: 10px; }

   * html .popup_check { float: left; padding-top: 2px; padding-left: 10px; }

   .popup_check_desc { float: left; padding-top: 6px; color: #ccc; padding-left: 5px; letter-spacing: 0; }

   * html .popup_check_desc { float: left; padding-top: 7px; color: #ccc; padding-left: 5px; letter-spacing: 0; }

   .popup_close { float: right; padding-top: 6px; color: #ccc; padding-right: 10px; cursor: pointer; letter-spacing: 0; }

   * html .popup_close { float: right; padding-top: 7px; color: #ccc; padding-right: 10px; cursor: pointer; letter-spacing: 0; }

</style> 
 

<script type="text/javascript">

jQuery(

   function()

   

      jQuery('.pchk').each(

      function(i)

      {

         jQuery(this).click(function(){

         var id = jQuery(this).parent().parent().parent().attr('id');

         jQuery.cookie(id, 'Y',{ expires: 1});   

         jQuery('#'+id).fadeOut();

      });

   }

);

jQuery('.popup_close').each(

   function(i)

   {

      jQuery(this).click(function(){

         var id = jQuery(this).parent().parent().attr('id');

         jQuery('#'+id).fadeOut();

      });

      }

   );

   }

);
</script> 

<!--  팝업 관리 시작 -->

<div id="popupid_1" class="popup" style="width:200px; background-color: black; padding: 1px;" left="20px" top="30px">

   <div><img src="/images/main_theme3.jpg"></div>

   <div class="popup_bottom" style="width: 200px;">

   <div class="popup_check"><input type="checkbox"  class="pchk" /></div>

   <div class="popup_check_desc">하루동안 열지않기</div>

   <div class="popup_close">닫기</div>

</div>

</div>

<!--  팝업 관리 끝  --> 

저작자 표시
Posted by WeAreK5 WeAreK5
2011/11/15 16:58
개발 한 후 서버로 deploy할 방법을 찾다가 maven-antrun-plugin 으로 deploy하는 방법을 찾았다.

pom.xml 파일에 아래 plugin의 내용을 plugins 의 child로 넣어주면 끝~!
<build> 
....
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<ftp server="서버정보(hostname or ip)"

remotedir="서버의 파일이 위치할 디렉토리 경로"

          userid="사용자아이디"
          password="비밀번호">
          <fileset dir="로컬디렉토리경로">

          <include name="*.war"/>

          </fileset>
</ftp>
<ftp server="서버정보2"

remotedir="서버의 파일이 위치할 디렉토리 경로"

          userid="사용자아이디"
          password="비밀번호">
          <fileset dir="로컬디렉토리경로">

          <include name="*.war"/>

          </fileset>
</ftp>
</tasks>
</configuration>
<executions>
<execution>

<id>ftp</id>

          <phase>deploy</phase>
          <goals>
          <goal>run</goal>
          </goals>
</execution>
</executions>
<dependencies>

<dependency>

          <groupId>ant</groupId>
          <artifactId>ant-commons-net</artifactId>
          <version>1.6.5</version>
          </dependency>
          <dependency>
          <groupId>commons-net</groupId>
          <artifactId>commons-net</artifactId>
          <version>1.4.1</version>
          </dependency>
</dependencies>
</plugin>
</plugins>
</build>


출처 : http://blog.naver.com/PostView.nhn?blogId=dadagump&logNo=60089753372


 
저작자 표시
Posted by WeAreK5 WeAreK5
2011/11/15 00:57
http://slides.html5rocks.com : HTML5로 만든 HTML의 API들을 소개

http://www.findmebyip.com/litmus : HTML5 / CSS3 지원 여부 체크

http://playground.html5rocks.com : HTML5 / CSS3 / API 연습 하는 사이트

http://b.mytears.org/2009/01/1151 : 폰트 관련


출처 : http://cafe.naver.com/webappdev/3772 
저작자 표시
Posted by WeAreK5 WeAreK5
2011/11/15 00:55

A list of useful HTML5 & CSS3 resources from my bookmarks. (You will probably need a modern browser).

HTML5 Basics & Introduction

Resources & Tools

Tutorials

Demos & Inspiration

Video Players

Browsers that support HTML5

Sites That Play HTML5 compatible video (H264, ogg etc)

Not all sites play all the time. These offer some support.

Audio Players

Games

Canvas Drawing & Sketchpad

Designers & Developers

CSS3

If you have a resource I haven’t included, then please feel free to mention it in the comments.


출처 : http://www.franksinton.com/html5-list/ 

저작자 표시
Posted by WeAreK5 WeAreK5
2011/01/13 08:58

일단 아이폰 어플개발하기전에 Objective-C 언어를 익혀야되는데요.
Mac이 개인에게 다 있는게 아니고 Objective-C 기초를 익히는 단계에선 아직 Mac보다는
Window 환경에서 Objective-C를 먼저 익히는게 좋을 겉 같아 자료를 조금 정리해 보았습니다..


1. 설치 파일 다운로드
    GNUstep System  0.24.0
        -
http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/gnustep-system-0.24.0-setup.exe
    GNUstep Core 0.23.1
        -
http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/gnustep-core-0.23.1-setup.exe
    Dev c++ 
        - http://www.appsnext.com/work_data/devcpp-4.9.9.2_nomingw_setup.exe


2. 파일 설치
    GNUstep System  ->GNUstep Core  ->dev c++  순서로 설치

3. Dev-Cpp 환경설정 
    objc 프레임워크(기본 Objective-C ) 뿐만아니라 Foundation 프레임워크(MAC 코코아 환경에서 쓰는 프레임워크)에서 돌아가는 예제로 설명하겠습니다. 

  • Dev-Cpp 실행
  • 한국어 선택
  • 도구 메뉴 > 컴파일러설정

  • 컴파일러 설정
    화면에 보시는대로 두개의 체크박스 체크후 
      첫번째에
    -lobjc -lgnustep-base -fconstant-string-class=NSConstantString -enable-auto-import
    두번재에 
     -lobjc -lgnustep-base -fconstant-string-class=NSConstantString -enable-auto-import

  • 실행파일 설정
    실행파일들에 C:GNUstepmingwbin,  C:GNUstepbin

  • 라이브러리 설정
    라이브러리에 C:GNUstepmingwlib,  C:GNUstepGNUstepSystemLibraryLibraries 추가

  • 인클루드 설정
     인클루드에  C:GNUstepmingwinclude,  C:GNUstepGNUstepSystemLibraryHeaders

4. Dev-Cpp 에서 실제 예제 가지고 실행해보기

  •  Dev-C++ 를 실행하고 새로만들기 > 프로젝트를 클릭

  • Empty Project 를 선택하고, 프로젝트명을 hello 로 입력하고 라디오버튼은 C를 선택

  • 새로만들 프로젝트를 저장


  • 생성된 hello 프로젝트를 선택하고 오른쪽버튼 클릭-> 유닛추가를 클릭

  • Objective-C 예제를 코딩

  • 이제 저장인데요. Dev-Cpp 의 경우 기본적으로 C와 C++ 컴파일을 지원하기때문에 파일을 Objective-C 의 확장자인 m형식의 파일로 저장하기위해서는 파일형식을 All files 로 해놓고 저장해야합니다
    저장한뒤 F9 버튼을 누릅니다.


저작자 표시
Posted by WeAreK5 WeAreK5