아래의 명령을 이용하여 fresh를 설치 한다 go get github.com/pilu/fresh 그리고 해당 프로젝트 폴더로 이동후 fresh를 실행 한다. (내 웹 프로젝트가 test 라면 아래와 같이 test 폴더로 이동후 fresh를 실행하면 아래야 같이 메시지가 나온다.) C:\work\src\test>fresh 16:56:36 runner | InitFolders 16:56:36 runner | mkdir ./tmp 16:56:36 watcher | Watching . 16:56:36 watcher | Watching templates 16:56:36 main | Waiting (loop 1)... 16:56:36 main | receiving first event / 16:56:36 main..
mssql에서 week of year 값 구하기 (postgresql의 iyyyiw와 같은 값) ALTER PROCEDURE dbo.sp_week_of_year @date datetime, -- 날짜 @first_day_of_week int -- 주간의 시작 요일 AS BEGIN set nocount on; -- 주간의 시작 요일을 설정 한다. set datefirst @first_day_of_week; declare @week_first datetime declare @year_first datetime -- 입력받은 일자 시작요일로 변경 set @week_first = @date - (datepart(weekday, @date) - 1); -- 해당년도 1월1일 set @year_first = dat..
c#에서 Week Of Year 값 구하기 GregorianCalendar cal = new GregorianCalendar(GregorianCalendarTypes.Localized); int week = cal.GetWeekOfYear(date, CalendarWeekRule.FirstFullWeek, firstDayOfWeek); if(date.Month == 1 && week >= 50) { return date.AddYears(-1).Year.ToString() + week.ToString().PadLeft(2, '0'); } else { return date.Year.ToString() + week.ToString().PadLeft(2, '0'); }
출처: http://www.davidghedini.com/pg/entry/install_postgresql_9_on_centos This post will cover installing and basic configuration of PostgreSQL 9.x on CentOS. We will install PostgreSQL 9 using the PostgreSQL repository and yum. The same procedure can be used to install PostgreSQL 9 on Red Hat and Fedora using the appropriate rpm. Optionally, we'll also see how to install PostGIS. As the directory..
테이블 생성 쿼리 생성 함수 CREATE OR REPLACE Function pg_get_tabledef(text) RETURNS text AS $$ DECLARE tabledef TEXT; dotpos integer; tablename text; schemaname text; prevcol text; coltype text; notnull1 boolean; rec record; oidcheck boolean; BEGIN dotpos:=strpos($1,'.'); if dotpos = 0 then schemaname:='public'; tablename:=substr($1,dotpos+1); else schemaname:=substr($1,1,dotpos-1); tablename:=substr($1,do..
현재 mybatis는 3.1.1 까지 나와 있다.하지만 뭐가 문제인지 spring 3.1.1에서 같이 사용해보니 아래와 같은 오류가 난다. java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransactionFactory.newTransaction(Ljava/sql/Connection;)Lorg/apache/ibatis/transaction/Transaction; 그래서 3.1.0으로 해봤으나 결과는 같은 오류가 났다.다시 버전을 하나더 내려서 3.0.6으로 해봤더니 정상적으로 동작하는걸 확인할 수 있었다. ===============================================================..
링크 : CodeIgniter 한국 사용자 포럼
먼저 yum을 이용해 subversion을 설치 한다. # yum install subversion svn의 데이터를 저장할 폴더를 생성 한다. # mkdir /home/svn 위에서 생성한 폴더로 이동한 후 repository를 생성 명령을 실행 한다. # cd /home/svn # svnadmin create repo repository 생성이 완료 되면 해당 폴더 하위에 conf 폴더가 생성 되며 conf 폴더 안에는 svnserve.conf라는 파일이 존재 한다. # vi /home/svn/repo/conf/svnserve.conf 아래는 vi로 열어본 svnserve.conf 파일의 내용이며 아래와 같이 수정 하자. ### This file controls the configuration of ..
# yum install yum-priorities # cd /etc/yum.repos.d/ # wget http://jpackage.org/jpackage50.repo 자바가 설치 되어 있지 않을 경우 자바 설치# yum install java # yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps 참조 사이트 : http://www.how2centos.com/installing-tomcat-6-on-centos-5-5-tutorial/ ※ tomcat7 설치 방법
sudo 명령을 사용하기 위해서는 /etc/sudoers 파일을 수정 해야 한다. ## Sudoers allows particular users to run various commands as ## the root user, without needing the root password. ## ## Examples are provided at the bottom of the file for collections ## of related commands, which can then be delegated out to particular ## users or groups. ## ## This file must be edited with the 'visudo' command. ## Host Aliases ## ..
출처: http://www.clearboth.org/ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs/ 이 문서는 Ultimate IE6 Cheatsheet: How To Fix 25+ Internet Explorer 6 Bugs를 이석진님께서 번역해 주신 것입니다. 감사합니다. IE 6를 가장 잘 다루는 전략은 지원하는게 아니다. 잠시만. 좋아요, 당신이 느끼는 좌절감을 나도 느껴요. 당신은 개발자고, 당신은 IE6을 사용할 수 밖에 없기 때문에 머리털을 다 뽑고 싶을 정도로 괴로울 거에요. 그러나 열 받게도 IE6는 당신을 돕지 않을거에요. 당신이 몇 시간을 투자해도 레이아웃이 제대로 안 된다고 느낄거에요. 나도 고통을 느낄 수 있어요. ..
cURL (Client URL Library Functions) 제작자 Daniel Stenberg 의 설명을 그대로 변역하면 curl is a comand line tool for transferring files with URL syntax 커맨드라인에서 URL 문법을 사용하여 파일을 전송 프로그램 내가 원하는 주소의 페이지에서 내가 임의의 값을 넣고 그 넣은 값으로 페이지에서 리턴되는 값을 받아오는 역할을 한다. PHP에서 cURL을 사용하려는 사람들 대부분이 아마도 HTTPS 접속 때문일 것이다. 소켓 또는 그 외 여러가지 접속방법이 있는데 굳이 cURL을 사용하는 건 속도면에서도 빠르고 HTTPS도 쉽게 접속할 수 있기 때문이다. cURL 모듈을 서버에 설치해야 합니다.(리눅스 - curl.so..
Item Example Comment IE [if IE] The string "IE" is a feature corresponding to the version of Internet Explorer used to view the Web page. value [if IE 7] An integer or floating point numeral corresponding to the version of the browser. Returns a Boolean value of true if the version number matches the browser version. For more information, see Version Vectors. WindowsEdition [if WindowsEdition] I..
SELECT * FROM 테이블명 AND 필드명 = #{파라미터} 위와 같은 쿼리 실행시 NumberFormatException이 발생 한다면 아래와 같이 코드를 수정 하면 해결 될 것이다. SELECT * FROM 테이블명 AND 필드명 = #{파라미터} OR SELECT * FROM 테이블명 AND 필드명 = #{파라미터} 보너스 (대소문자 무시) SELECT * FROM 테이블명 AND 필드명 = #{파라미터}
메시지 박스 같은 것을 만들다 보면 문자열의 길이가 일정하지 않다. 보통의 html tag들은 height는 내용에 따라 늘어나지만 width는 대부분 그렇지 않다. 그래서 문자열의 width를 구하는 방법을 생각해보던 중 그럴싸한 트릭을 생각해냈다. 우선 간단하게 설명을 하면 span tag는 문자열 만큼 width가 늘어나므로 span tag를 이용하여 문자열의 width를 구하면 된다. 1. span tag의 position: absolute로 설정 한다. 2. span tag의 좌표를 화면에 보이지 않는 좌표로 잡는다 (예를 들면 top: -10000 또는 left: -10000) 3. 폰트와 같이 width에 영향을 미치는 style들도 감안한다. 4. span tag에 문자열을 넣는다. 5. ..
- Total
- Today
- Yesterday