paperSelector.find("option:not(:selected)").each(function(){
$(this).attr("disabled",true);
});
// 선택안된 셀렉트 옵션 잠그기
if(advStudent.filter(':checked').val()==1){ //학생이면
tr_std.html(tr_std_html).fadeIn(150).css("background-color","#fffff");
}else{ // 학생이 아니면
tr_dis_reg.html(tr_dis_reg_html).fadeIn(150).css("background-color","#ffffff");
}
// 라디오 박스 체크된값 가져오기,
2015년 10월 29일 목요일
2015년 10월 27일 화요일
button줄바꿈
<input type="button" value="Really
Tall
 Button">
// this is not work on IE etc...
<input style="width:100px;white-space: normal;" type="button"
value="kkkkkk kkkkkkk kkkkkkkkk">
// it works perfectly.
// but it could not works that i want
<button style="width:250px;">Online Registration<br>(For International Participants</button>
// finally ... not bad.
// 하지만 overflow 시에는 직접 잘라줘야함.
// this is not work on IE etc...
<input style="width:100px;white-space: normal;" type="button"
value="kkkkkk kkkkkkk kkkkkkkkk">
// it works perfectly.
// but it could not works that i want
<button style="width:250px;">Online Registration<br>(For International Participants</button>
// finally ... not bad.
// 하지만 overflow 시에는 직접 잘라줘야함.
2015년 10월 18일 일요일
사용자이벤트
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Type
// 이벤트 핸들러 생성
TMy1stEvent = procedure(PrvValue, CurValue: integer) of object;
// 값 변경 감시 클래스 정의 [사용자 이벤트 정의]
TWatchChangeValue = class
private
FOnChangeVal : TMy1stEvent;
public
procedure ChangeValue(PrvValue, CurValue: integer);
published
property OnChangeValue : TMy1stEvent read FOnChangeVal write FOnChangeVal;
end;
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
// 값 변경 감시 클래스 선언
WatchChangeValue : TWatchChangeValue;
// 이벤트 발생시 호출하는 함수 선언
procedure ChangeValue2(PrvValue, CurValue: integer);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
// 이벤트를 발생시키는 트리거 함수
WatchChangeValue.ChangeValue(edit1.Tag, StrToInt(edit1.Text));
if edit1.Tag <> StrToInt(edit1.Text) then
edit1.Tag := StrToInt(edit1.Text);
end;
// 이벤트 발생시 호출하는 함수
procedure TForm1.ChangeValue2(PrvValue, CurValue: integer);
begin
// 변경전 값과 변경후 값 표시
self.Caption := IntToStr(PrvValue) + '>>>' + IntToStr(CurValue)
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// 이벤트 등록
WatchChangeValue := TWatchChangeValue.Create();
// 값 변경 이벤트가 발생되었을 때 호출할 함수 설정
WatchChangeValue.OnChangeValue := ChangeValue2;
end;
{ TWatchChangeValue }
// 이벤트 호출
procedure TWatchChangeValue.ChangeValue(PrvValue, CurValue: integer);
begin
if Assigned(OnChangeValue) then OnChangeValue(PrvValue, CurValue);
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Type
// 이벤트 핸들러 생성
TMy1stEvent = procedure(PrvValue, CurValue: integer) of object;
// 값 변경 감시 클래스 정의 [사용자 이벤트 정의]
TWatchChangeValue = class
private
FOnChangeVal : TMy1stEvent;
public
procedure ChangeValue(PrvValue, CurValue: integer);
published
property OnChangeValue : TMy1stEvent read FOnChangeVal write FOnChangeVal;
end;
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
// 값 변경 감시 클래스 선언
WatchChangeValue : TWatchChangeValue;
// 이벤트 발생시 호출하는 함수 선언
procedure ChangeValue2(PrvValue, CurValue: integer);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
// 이벤트를 발생시키는 트리거 함수
WatchChangeValue.ChangeValue(edit1.Tag, StrToInt(edit1.Text));
if edit1.Tag <> StrToInt(edit1.Text) then
edit1.Tag := StrToInt(edit1.Text);
end;
// 이벤트 발생시 호출하는 함수
procedure TForm1.ChangeValue2(PrvValue, CurValue: integer);
begin
// 변경전 값과 변경후 값 표시
self.Caption := IntToStr(PrvValue) + '>>>' + IntToStr(CurValue)
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// 이벤트 등록
WatchChangeValue := TWatchChangeValue.Create();
// 값 변경 이벤트가 발생되었을 때 호출할 함수 설정
WatchChangeValue.OnChangeValue := ChangeValue2;
end;
{ TWatchChangeValue }
// 이벤트 호출
procedure TWatchChangeValue.ChangeValue(PrvValue, CurValue: integer);
begin
if Assigned(OnChangeValue) then OnChangeValue(PrvValue, CurValue);
end;
end.
// 출처 Posted by 떡잎 http://wwwi.tistory.com/280
2015년 8월 28일 금요일
이미정의되어있습니다
error LNK2005: xxx already defined in MSVCRT.lib(MSVCR100.dll)
c/C++ > Code Generation > Runtime Library to Multi-threaded library (DLL) /MD
or Other
2015년 8월 26일 수요일
%출력형식
%c 문자
%C %c
%s 문자열
%p 포인터값 16진수
%d 10진수 부호있는 정수
%i %d
%u 10진수 부호없는 정수
%f 부동소수점 실수 소수 표현 무한수를 표현할 때 소문자 표현
%F %f 무한수를 표현할 때 대문자 표현
%e 부동소수점 실수 지수 표현
%E %e e 대신 E 로 출력
%g 크기가 작으면 %f, 크기가 크면 %e
%G 크기가 작으면 %f, 크기가 크면 %E
%x 16진수 정수 소문자 0 ~ 9,a,b,c,d,e,f
%X 16진수 정수 대문자 0 ~ 9,A,B,C,D,E,F
%o 8진수 정수
%n Print nothing, but write number of characters successfully written so far into an integer pointer parameter.
%% % 출력
%C %c
%s 문자열
%p 포인터값 16진수
%d 10진수 부호있는 정수
%i %d
%u 10진수 부호없는 정수
%f 부동소수점 실수 소수 표현 무한수를 표현할 때 소문자 표현
%F %f 무한수를 표현할 때 대문자 표현
%e 부동소수점 실수 지수 표현
%E %e e 대신 E 로 출력
%g 크기가 작으면 %f, 크기가 크면 %e
%G 크기가 작으면 %f, 크기가 크면 %E
%x 16진수 정수 소문자 0 ~ 9,a,b,c,d,e,f
%X 16진수 정수 대문자 0 ~ 9,A,B,C,D,E,F
%o 8진수 정수
%n Print nothing, but write number of characters successfully written so far into an integer pointer parameter.
%% % 출력
2015년 8월 19일 수요일
javascript-delay
setTimeout( function, mile second );
ex) setTimeout("helloworld()", 1000); // 1000 mile second == 1 second
일정시간 딜레이만 주려면 아래와 같은 함수를 만들어 사용하면 된다.
function delay(gap){ /* gap is in millisecs */
var then,now;
then=new Date().getTime();
now=then;
while((now-then)<gap){
now=new Date().getTime(); // 현재시간을 읽어 함수를 불러들인 시간과의 차를 이용하여 처리
}
}
ex) setTimeout("helloworld()", 1000); // 1000 mile second == 1 second
일정시간 딜레이만 주려면 아래와 같은 함수를 만들어 사용하면 된다.
function delay(gap){ /* gap is in millisecs */
var then,now;
then=new Date().getTime();
now=then;
while((now-then)<gap){
now=new Date().getTime(); // 현재시간을 읽어 함수를 불러들인 시간과의 차를 이용하여 처리
}
}
2015년 8월 11일 화요일
jquery-required
$("form").submit(function(e) {
var ref = $(this).find("[required]");
$(ref).each(function(){
if ( $(this).val() == '' )
{
alert("Required field should not be blank.");
$(this).focus();
e.preventDefault();
return false;
}
}); return true;
});
var ref = $(this).find("[required]");
$(ref).each(function(){
if ( $(this).val() == '' )
{
alert("Required field should not be blank.");
$(this).focus();
e.preventDefault();
return false;
}
}); return true;
});
피드 구독하기:
글 (Atom)