iOS Push Notification Service with JDK7

Web Programing 2015. 3. 11. 13:20
Java 7 에서는 Apple 에서 발급한 인증서를 사용하지 못한다.
javapns.communication.exceptions.InvalidCertificateChainException: Invalid certificate chain (Received fatal alert: certificate_unknown)!  Verify that the keystore you provided was produced according to specs...
 at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:410)
 at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350)
 at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:320)
 at javapns.Push.sendPayload(Push.java:177)
 at javapns.Push.payload(Push.java:149)
 ...
jdk1.6에서 인증서 파일 포맷을 변환하고 (.p12 to .jks)
그 파일을 다시 jdk1.7에서 변환하면(.jks to .p12) 정상적으로 작동 한다.

/usr/local/jdk1.6/bin keytool -importkeystore -destkeystore CERTIFICATES.jks -srckeystore CERTIFICATES.p12 -srcstoretype PKCS12
/usr/local/jdk1.7/bin keytool -importkeystore -srckeystore CERTIFICATES.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore CERTIFICATES.jdk7.p12

참고 : https://code.google.com/p/javapns/issues/detail?id=165


설정

트랙백

댓글

Twitter API (javascript)

Web Programing/JavaScript 2011. 8. 23. 11:34

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

<form id="frm" name="frm" action="/" method="get" onsubmit="javascript:getTweets(); return false;" >
		<h3>Twitter API (javascript)</h3>
		<div style="width:640px; min-height:40px;border:1px solid skyblue; padding:15px;">
			<div>
				screenName : <input type="text" id="screenName" value="wowhyun" />, 
				count : <input type="text" id="count" value="5" />
				<input type="submit" value="트윗 가져오기" />
			</div>
			<div>
				<input type="button" value="Limit 확인" id="getLimitBtn" /> 
				<span id="remaining-hits"></span>
			</div>
		</div>
		<div style="width:640px; min-height:40px; border:1px solid green; margin-top:10px; padding:15px;">
				<ol id="twitterList"></ol>
		</div>
</form>

<script type="text/javascript">
function chkTweetLinks(s){
	var regLink = new RegExp('(http|https|ftp|telnet|news|irc)://([-/.a-zA-Z0-9_~#%$?&=:200-377()]+)','gi');
	var r = s.replace(regLink,'<a href="$1://$2" target="_blank">$1://$2</a>')
		.replace(/(^|\s)@(\w+)/g, '$1@<a href="http://www.twitter.com/$2" target="_blank">$2</a>')
		.replace(/(^|\s)#(\w+)/g, '$1#<a href="http://search.twitter.com/search?q=%23$2" target="_blank">$2</a>');
	return r;
}
function getTweets(){
	jQuery.getJSON(
		'http://api.twitter.com/1/statuses/user_timeline.json?trim_user=t&include_rts=true&callback=?',
		{ screen_name: $('#screenName').val(), count: $('#count').val() },
		function(data){
			$('#twitterList').hide();
			$('#twitterList').empty();
			jQuery.each(data, function(i,item){
				$('#twitterList').append('<li>'+chkTweetLinks(item.text)+'<br /> -'+item.created_at+'</li>');
			});
			$('#twitterList').fadeIn('slow');
			getRemainLimits();
    }
	);
}

function getRemainLimits(){
	$('#remaining-hits').hide();
	jQuery.getJSON(
		'http://api.twitter.com/1/account/rate_limit_status.json?callback=?',
		function(data){
			$('#remaining-hits').html(data['remaining_hits']+' (reset_time : '+data['reset_time']+') ');
			$('#remaining-hits').fadeIn('slow');
    }
	);
}

$(function () {
    $('#getLimitBtn').click(getRemainLimits);
    getTweets();
});
</script>

설정

트랙백

댓글

소스 코드 구문강조. SyntaxHighlighter 2.0.320 - 티스토리 적용기

Web Programing 2009. 5. 27. 20:40
1. 스킨 > HTML/CSS 편집 > skin.html 에 아래 코드를 적용
<head>
...

<!-- SyntaxHighlighter 2.0.320 -->
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shCore.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushBash.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushCpp.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushCSharp.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushCss.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushJava.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushJScript.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushPhp.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushSql.js"></script>
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" 
	href="http://alexgorbatchev.com/pub/sh/2.0.320/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" 
	href="http://alexgorbatchev.com/pub/sh/2.0.320/styles/shThemeDefault.css"/>
<script type="text/javascript">
	SyntaxHighlighter.config.clipboardSwf 
		= 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf';
	SyntaxHighlighter.defaults['auto-links'] = false; 
	SyntaxHighlighter.all();
</script>

...
</head>
hosted version 을 사용하여 스킨 변경시의 불필요함을 최소화 한다.
사용하지 않는 언어는 제외.
기본 설정에서 auto-links 값 변경.


1-1. 기존에 SyntaxHighlighter 1.5 버전을 사용하여 글을 올렸다면, 아래 코드가 추가로 필요하다.
<head>
...

<!-- 기존 SyntaxHighlighter 1.5 사용시 추가  -->
<script type="text/javascript" 
	src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shLegacy.js"></script>
...
</head>
<body onLoad="dp.SyntaxHighlighter.HighlightAll('code');">

2. 글쓰기
<!-- 적용 예 -->
<pre class="brush: xml; highlight: [1];">
&lt;!-- Daum WebInside --&gt;
&lt;script type="text/javascript"  charset="euc-kr" 
	src="http://log.inside.daum.net/dwi_log/js/dwi.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" &gt;
	_dwiPID="d-A63-***";
	if(typeof(_dwiCatch) == "function") { _dwiCatch();}
&lt;/script&gt;
</pre>

xml 형태의 코드를 올릴땐 &lt;(<),&gt;(>) 를 사용해서
티스토리에서 태그로 인식하지 않게 해야 대문자로의 변경을 피할 수 있다.

아래 링크에서 기본으로 제공되는 언어(brush값) 확인 가능.

http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes

설정

트랙백

댓글

SyntaxHighlighter 1.5

Web Programing 2009. 5. 26. 15:20

</body> 앞에 다음 문장을 추가한다.

적용할땐

C++, C#, Delphi, Java, PHP, Python, Ruby, VB, HTML, XML 등을 지원한다

설정

트랙백

댓글

[ASP] Scripting.FileSystemObject

Web Programing/ASP 2008. 2. 12. 17:38
Dim fs, objFile

Set fs = Server.CreateObject("Scripting.FileSystemObject")
If Not fs.FileExists(Server.MapPath("/test.xml")) Then 
	fs.CreateTextFile(Server.MapPath("/test.xml"))
End If
Set objFile = fs.OpenTextFile(Server.MapPath("/test.xml"), 2)

objFile.writeLine("" & VbCr)
objFile.writeLine("" & VbCr)
objFile.writeLine("" & VbCr)
objFile.close 

설정

트랙백

댓글

색상표

Web Programing 2008. 1. 1. 23:28

#93DAFF #98DFFF #9DE4FF #A2E9FF #A7EEFF #ACF3FF #B0F7FF #B4FBFF #B9FFFF #C0FFFF
#87CEFA #91D8FA #A5D8FA #AFDDFA #B9E2FA #C3E7FA #CDECFA #D7F1FA #E1F6FA #EBFBFF
#00BFFF #0AC9FF #14D3FF #1EDDFF #28E7FF #32F1FF #3CFBFF #46FFFF #96FFFF #C8FFFF
#00A5FF #00AFFF #00B9FF #00C3FF #00CDFF #00D7FF #00E1FF #00EBFF #00F5FF #00FFFF
#1EA4FF #28AEFF #32B8FF #3CC2FF #46CCFF #50D6FF #5AE0FF #6EE0FF #6EEAFF #78F3FF
#1E90FF #289AFF #32A4FF #3CAEFF #46B8FF #50C2FF #5ACCFF #64D6FF #6EE0FF #78EAFF
#96A5FF #A0AFFF #AAB9FF #B4C3FF #BECDFF #C8D7FF #D2E1FF #DCEBFF #E8F5FF #F4FFFF
#86A5FF #90AFFF #9AB9FF #A4C3FF #AECDFF #B8D7FF #CCE1FF #E0EBFF #EBF5FF #F9FFFF
#6495ED #6E9FED #78A9ED #82B3ED #8CBDED #96C7ED #A0D1F7 #AADBFF #B4E5FF #BEEFFF
#0078FF #0A82FF #148CFF #1E96FF #28A0FF #32AAFF #3CB4FF #46BEFF #50C8FF #5AD2FF
#0064FF #0A6EFF #1478FF #1E82FF #288CFF #3296FF #3CA0FF #46AAFF #50B4FF #5ABEFF
#0000FF #3232FF #5050FF #646EFF #6478FF #6482FF #648CFF #6496FF #64A0FF #64AAFF
#4169E1 #4B73E1 #557DE1 #5F87E1 #6991E1 #739BE1 #7DA5E1 #87AFEB #91B9F5 #9BC3FF
#0064CD #0A6ECD #1478CD #1E82CD #288CD2 #3296D7 #3CA0E1 #46AAEB #50B4F5 #5ABEF5
#5A5AFF #6464FF #6E6EFF #7878FF #8282FF #8C8CFF #A0A0FF #B4B4FF #C8C8FF #D2D2FF
#7B68EE #8572EE #8F7CEE #9986EE #A390EE #AD9AEE #B7A4EE #C1AEEE #CBB8EE #D5C2EE
#6A5ACD #7E6ECD #8878CD #9282CD #9C8CCD #A696CD #B0A0CD #BAAAD7 #C4B4E1 #CEBEE1
#0000CD #2828CD #4646CD #6464CD #6E6ED7 #7878E1 #8282EB #8C8CF5 #9696FF #A0A0FF
#00008C #14148C #28288C #3C3C8C #50508C #646496 #7878AA #8C8CBE #A0A0C8 #B4B4DC
#483D8B #52478B #5C518B #665B8B #70658B #7A6F95 #84799F #8E83A9 #988DB3 #A297BD
#000069 #1E3269 #323C73 #3C467D #3C5087 #3C5A91 #46649B #506EA5 #5A78AF #6482B9

#3DFF92 #47FF9C #51FFA6 #5BFFB0 #65FFBA #6FFFC4 #79FFCE #75FFCA #7AFFCF #7FFFD4
#55EE94 #5FEE9E #69EEA8 #73EEB2 #7DEEBC #87EEC6 #91F8D0 #9BFFDA #A5FFE4 #AFFFEE
#66CDAA #70D2B4 #7AD7BE #84DCC8 #8EE1D2 #98EBDC #9DF0E1 #A2F5E6 #A7FAEB #ACFFEF
#AAEBAA #B4F0B4 #BEF5BE #C8FAC8 #D2FFD2 #DCFFDC #E1FFE1 #E6FFE6 #EBFFEB #F0FFF0
#80E12A #8AE634 #94EB3E #9EF048 #A8F552 #B2FA5C #BCFF66 #C1FF6B #C6FF70 #CBFF75
#52E252 #5CE75C #66EC66 #70F170 #7AF67A #84FB84 #89FB89 #8EFB8E #93FB93 #98FB98
#64CD3C #6ED746 #78E150 #82EB5A #8CF064 #96F56E #9BFA73 #A0FA78 #A5FA7D #AAFA82
#13C7A3 #18CCA8 #1DD1AD #22D6B2 #27DBB7 #2CE0BC #31E0C1 #36E0C6 #3BE0CB #40E0D0
#46B4B4 #50BEBE #5AC8C8 #64D2D2 #6EDCDC #73E1E1 #78E6E6 #7DEBEB #82F0F0 #87F5F5
#20B2AA #2ABCB4 #34C6BE #3ED0C8 #48DAD2 #52E4DC #57E9E1 #5CEEE6 #61F3EB #66F8F0
#5F9EA0 #69A8AA #73B2B4 #7DBCBE #87C6C8 #91D0D2 #96D5D7 #9BDADC #A0DFE1 #A5E3E6
#3CB371 #46BD7B #50C785 #5AD18F #64DB99 #6EE5A3 #73EAA8 #78EFAD #7DF4B2 #82F9B7
#2E8B57 #389561 #429F6B #4CA975 #56B37F #60BD89 #65C28E #6AC793 #6FCC98 #74D19D
#228B22 #2C952C #369F36 #40A940 #4AB34A #54BD54 #5EC75E #63CC63 #68D168 #6DD66D
#497649 #538053 #5D8A5D #679467 #719E71 #7BA87B #80AD80 #85B285 #8AB78A #8FBC8F
#006400 #0A6E0A #147814 #1E821E #288C28 #329632 #3CA03C #41A541 #46AA46 #4BAF4B
#008C8C #0A9696 #14A0A0 #1EAAAA #28B4B4 #32BEBE #37C3C3 #3CC8C8 #41CDCD #46D2D2
#008080 #0A8A8A #149494 #1E9E9E #28A8A8 #32B2B2 #37B7B7 #3CBCBC #41C1C1 #46C6C6

#FFB6C1 #FFBBC6 #FFC0CB #FFC5D0 #FFCAD5 #FFCFDA #FFD4DF #FFD9E4 #FFDEE9 #FFE3EE
#FFAAAF #FFB4B9 #FFBEC3 #FFC8CD #FFD2D7 #FFDCE1 #FFE1E6 #FFE6EB #FFEBF0 #FFF0F5
#FF9E9B #FFA8A5 #FFB2AF #FFBCB9 #FFC6C3 #FFD0CD #FFD5D2 #FFDAD7 #FFDFDC #FFE4E1
#FF7A85 #FF848F #FF8E99 #FF98A3 #FFA2AD #FFACB7 #FFB1BC #FFB6C1 #FFBBC6 #FFC0CB
#FF5675 #FF607F #FF6A89 #FF7493 #FF7E9D #FF88A7 #FF92B1 #FF9CBB #FFA6C5 #FFB0CF
#FF82FF #FF8CFF #FF96FF #FFA0FF #FFAAFF #FFB4FF #FFBEFF #FFC8FF #FFD2FF #FFDCFF
#FF7DB4 #FF87BE #FF91C8 #FF9BD2 #FFA5DC #FFAFE6 #FFB4EB #FFB9F0 #FFBEF5 #FFC3FA
#FF69B4 #FF73BE #FF7DC8 #FF87D2 #FF91DC #FF9BE6 #FFA5F0 #FFAAF5 #FFAFFA #FFB4FF
#FF1493 #FF1E9D #FF28A7 #FF32B1 #FF3CBB #FF46C5 #FF50CF #FF5AD9 #FF64E3 #FF6EED
#DB7093 #DB7A9D #DB84A7 #E08EB1 #E598BB #EAA2C5 #EAB1D4 #EFACCF #F4BBDE #F4B6D9
#D7567F #DC6089 #E16A93 #E6749D #EB7EA7 #F088B1 #F592BB #FA9CC5 #FFA6CF #FFB0D9
#C71585 #C71F8F #C73399 #C73DA3 #CC47AD #D151B7 #D65BC1 #E065CB #EA6FD5 #F479DF
#CD1039 #CD1F48 #CD2E57 #CD3861 #CD426B #D24C75 #D7567F #DC6089 #E16A93 #E6749D
#B9062F #B91A4D #BE2457 #C32E61 #C8386B #CD4275 #D24C7F #D75689 #DC6093 #E16A9D

#FAEB78 #FAF082 #FAF58C #FAFA96 #FAFAA0 #FAFAAA #FAFAB4 #FAFABE #FAFAD2 #FAFAD2
#FFDC3C #FFE146 #FFE650 #FFEB5A #FFF064 #FFF56E #FFFA78 #FFFA82 #FFFF8C #FFFF96
#FFC81E #FFD228 #FFD732 #FFDC3C #FFE146 #FFE650 #FFEB5A #FFF064 #FFF56E #FFF978
#FFB400 #FFBE0A #FFC314 #FFC81E #FFCD28 #FFD232 #FFD73C #FFDC46 #FFE150 #FFE65A
#FDCD8C #FDD296 #FDD7A0 #FDDCAA #FDE1B4 #FDE6BE #FDEBC8 #FDF5D2 #FDF5DC #FDF5E6
#FAC87D #FACD87 #FAD291 #FAD79B #FADCA5 #FAE1AF #FAE6B9 #FAEBC3 #FAEBCD #FAEBD7
#FFA500 #FFAF0A #FFB914 #FFC31E #FFCD28 #FFD732 #FFDC37 #FFE13C #FFE641 #FFEB46
#FF9100 #FF9B00 #FFA500 #FFAF00 #FFB900 #FFC300 #FFC800 #FFCD00 #FFD200 #FFD700
#FF8200 #FF8C0A #FF9614 #FFA01E #FFAA28 #FFB432 #FFB937 #FFBE3C #FFC341 #FFC846
#FFA98F #FFB399 #FFBDA3 #FFC7AD #FFD1B7 #FFDBC1 #FFE0C6 #FFE5CB #FFEAD0 #FFEFD5
#FFA374 #FFAD7E #FFB788 #FFC192 #FFCB9C #FFD0A1 #FFD5A6 #FFDAAB #FFDFB0 #FFE4B5
#FF9473 #FF9E7D #FFA887 #FFB291 #FFBC9B #FFC6A5 #FFD0AF #FFD0AF #FFD5B4 #FFDAB9
#FF7F50 #FF895A #FF9364 #FF9D6E #FFA778 #FFB182 #FFBB8C #FFC091 #FFC596 #FFCA9B
#CD853F #CD8F49 #D29953 #D7A35D #DCAD67 #E1B771 #E6C17B #EBC680 #F0CB85 #F5D08A
#D2691E #D27328 #D27D32 #D7873C #DC9146 #E19B50 #E6A55A #EBAA5F #EBAF64 #F0B469
#AE5E1A #B86824 #C2722E #CC7C38 #D68642 #E0904C #E59551 #EA9A56 #EF9F5B #F4A460
#8B4513 #8B4F1D #8B5927 #8B6331 #906D3B #957745 #9F814F #A48654 #A98B59 #AE905E

#FF9696 #FFA0A0 #FFAAAA #FFB4B4 #FFBEBE #FFC8C8 #FFD2D2 #FFDCDC #FFE6E6 #FFF0F0
#F08080 #F08A8A #F09494 #F59E9E #FAA8A8 #FAB2B2 #FAB7B7 #FABCBC #FAC1C1 #FAC6C6
#F56E6E #F57878 #F58282 #F58C8C #F59696 #F5A0A0 #F5AAAA #FAB4B4 #FABEBE #FAC8C8
#F06464 #F06E6E #F07878 #F08282 #F08C8C #F09696 #F4A0A0 #F4AAAA #F4B4B4 #FEBEBE
#FF0000 #FF3232 #FF4646 #FF5050 #FF5A5A #FF6464 #FF6E6E #FF7878 #FF8282 #FF8C8C
#EB0000 #EB3232 #EB4646 #EB5050 #EB5A5A #EB6464 #F06E6E #F57878 #FA8282 #FA8C8C
#CD0000 #CD3C3C #CD4646 #CD5050 #D25A5A #D76464 #DC6E6E #E17878 #E68282 #EB8C8C
#CD5C5C #CD6666 #CD7070 #CD7A7A #D28484 #D78E8E #DC9898 #E6A2A2 #EBACAC #F0B6B6
#B90000 #B93232 #B93C3C #B94646 #B95050 #BE5A5A #C35F5F #C86464 #CD6969 #D26E6E
#B22222 #B24040 #B24A4A #B25454 #B75E5E #BC6868 #C17272 #CB7776 #CB7C7C #D08180
#A52A2A #AA3E3E #AF4848 #B45252 #BE5C5C #C36666 #CD7070 #CD7A7A #D28484 #D78E8E
#800000 #803232 #853C3C #8F4646 #945050 #9E5A5A #A36464 #AD6E6E #B77878 #C18282

#CD853F #CD8B45 #CD904A #D2954F #D29A54 #D79F59 #D7A45E #E1A963 #E1AE68 #E6B36D
#DB631F #E56D29 #E57733 #EA813D #EF8B47 #EF904C #F49551 #F49A56 #F49F5B #F4A460
#D2691E #D27328 #D77D32 #D7873C #DC9146 #E19B50 #E6A055 #EBA55A #F0AA5F #F5AF64
#A0522D #A05C37 #A06641 #A5704B #AA7A55 #B4845F #B98E69 #C39873 #CDA27D #D7AC87
#8B4513 #8B4F1D #8B5927 #8B6331 #906D3B #9A7745 #A4814F #AE8B59 #B89563 #C29F6D
#DA70D6 #DF75DB #E47AE0 #E97FE5 #EE84EA #F389EF #F88EF4 #FD93F9 #FF98FE #FF9DFF
#BA55D3 #BF5AD8 #C45FDD #C964E2 #CE69E7 #D36EEC #D873F1 #DD78F6 #E27DFB #E782FF
#9932CC #9E37D1 #A33CD6 #A841DB #AD46E0 #B24BE5 #B750EA #BC55EF #C15AF4 #C65FF9
#9400D3 #9905D8 #9E0ADD #A30FE2 #A814E7 #AD19EC #B21EF1 #B723F6 #BC28FB #C12DFF
#942894 #9E329E #A83CA8 #B246B2 #BC50BC #C65AC6 #D064D0 #DA6EDA #E478E4 #EE82EE
#8c008c #960a96 #a014a0 #aa1eaa #b428b4 #be32be #c83cc8 #d246d2 #dc50dc #e65ae6
#800080 #8a0a8a #941494 #9e1e9e #a828a8 #b232b2 #bc3cbc #c646c6 #d050d0 #da5ada
#834683 #8d508d #975a97 #a164a1 #ab6eab #b578b5 #bf82bf #c98cc9 #d396d3 #dda0dd
#828282 #8c8c8c #969696 #a0a0a0 #aaaaaa #b4b4b4 #bebebe #c8c8c8 #d2d2d2 #dcdcdc
#000000 #282828 #323232 #3c3c3c #464646 #505050 #5a5a5a #646464 #6e6e6e #787878

설정

트랙백

댓글

[JavaScript] 오늘 하루 창 닫기

Web Programing/JavaScript 2007. 12. 26. 16:52

<script type="text/javascript">
function setCookie(name, value, expiredays){
    var todayDate = new Date();
    todayDate.setDate(todayDate.getDate() + expiredays);
    document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeWin(){
    if(document.checkClose.Notice.checked){
        setCookie( "popup_1211", "1" , 1);
    }
    self.close();
}
</script>


<form name="checkClose">
<input type="checkbox" name="Notice" onclick="javscript:closeWin();" />
</form>


<script type="text/javascript">
function init(){
    if(getCookie("popup_1211") != "1"){
        window.open("popup_1211.html", "ad_pop", "width=350,height=350,left=0,top=0,alwaysRaised=yes,toolbar=no,scrollbars=no");
    }
}
function getCookie( name ){
    var nameOfCookie = name + "=";
    var x = 0;
    while ( x <= document.cookie.length ) {
        var y = (x+nameOfCookie.length);
        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
            endOfCookie = document.cookie.length;
            return unescape( document.cookie.substring( y, endOfCookie ) );
        }
        x = document.cookie.indexOf( " ", x ) + 1;
        if ( x == 0 )
        break;
    }
    return "";
}
</script>

설정

트랙백

댓글

  • longchamp 2013.07.26 20:36 ADDR 수정/삭제 답글

    눈을 감아봐 입가에 미소가 떠오르면 네가 사랑하는 그 사람이 널 사랑하고 있는거야.

  • coach outlet 2013.07.28 14:20 ADDR 수정/삭제 답글

    당신 매력있어, 자기가 얼마나 매력있는지 모르는게 당신매력이야

[VB] DB connection

Web Programing 2007. 12. 26. 16:48

Dim strSQL As String
Dim objRs As New ADODB.Recordset

strConn = "Provider=SQLOLEDB.1;Password=passwd;Persist Security Info=True;User ID=id;Initial Catalog=db_name;Data Source=db"

Dim objConn As New ADODB.Connection
objConn.Open strConn

strSQL = "SELECT * FROM table WHERE end_date='" & end_date & "' And depth=2"

Set objRs = objConn.Execute(strSQL)

설정

트랙백

댓글

[ASP] Request.ServerVariables

Web Programing/ASP 2007. 12. 7. 15:54


어디서나 쉽게 검색되는 내용..


<table border=1>
<tr><td> key </td><td> value </td></tr>

<% For Each key In Request.SererVariables %>
<tr>
 <td><%= key %></td>
 <td><%
  If Request.serverVariables(key) ="" Then
   Response.Write "&nbsp;"
  Else
   Response.Write Request.ServerVariables(key)
  End If
  %>
 </td>
<tr>
<% Next %>
</table>

설정

트랙백

댓글

  • 승댕 2007.12.07 16:07 신고 ADDR 수정/삭제 답글

    http://blog.naver.com/chchcom?Redirect=Log&logNo=3292004
    잘 설명 되어있다 ㅎㅎ

  • bitty 2007.12.10 10:31 신고 ADDR 수정/삭제 답글

    너는 왜 적용 예가 없는거냐~

  • 씨댕 2008.09.25 15:26 ADDR 수정/삭제 답글

    http://taeyo.pe.kr/lecture/3_beginner_Objects/Request_ServerVariable.asp