[javascript]html5 video stop, reset, load
ยท
Languages/JavaScript
//var video = document.getElementById("videoContents"); var video = $("#videoContents")[0]; video.pause(); video.currentTime = 0; $("#videoContents").find("#videoSource").attr("src","URL"); video.load(); $('.videoArea').scrollTop(0); ์ •์ง€ : video.pause(); ์ดˆ๊ธฐํ™” : video.currentTime = 0; ๊ตฌํ˜„ : video.load(); ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ ์„ค๋ช… HTML5 ๋น„๋””์˜ค๋ฅผ ์ค‘์ง€, ์žฌ์„ค์ • ๋ฐ ๋กœ๋“œํ•˜๋ ค๋ฉด JavaScript๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŽ˜์ด์ง€์˜ ๋น„๋””์˜ค ์š”์†Œ์™€ ์ƒํ˜ธ ์ž‘์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ์ด๋Ÿฌํ•œ ๊ฐ ๊ธฐ๋Šฅ์„ ์ˆ˜ํ–‰..
[java]FilePart(fileUpload)
ยท
Languages/JAVA
package com.healthcare.common.upload.http; import java.io.File; import java.io.InputStream; import java.io.OutputStream; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import javax.servlet.ServletInputStream; public class FilePart extends Part { private String fileName; private String filePath; private String contentType; private PartInputStream..
[javascript]์ฐจํŠธ ๊ด€๋ จ ์Šคํฌ๋ฆฝ
ยท
Languages/JavaScript
var c1 = false; var c2 = false; var c3 = false; var c4 = false; function chart(ch, name) { var s1 = [[2, 162]]; //ํ‘œ์ค€ var s2 = [[3, 164]]; //๋ฐ˜๋ณ‘๊ท  var s3 = [[4, 163]]; //ํ•™๊ตํ‰๊ท  var s4 = [[1, 155]]; //๋‚˜ var ticks = [[1, "๋‚˜"], [2, "ํ‘œ์ค€"], [3, "๋ฐ˜ํ‰๊ท "], [4, "ํ•™๊ตํ‰๊ท "]]; if (ch == false) { var c = true; } else { var c = false; } var chart_name = name; plot1 = $.jqplot(chart_name, [s4, s1, s2, s3], { // Turns o..
[HTML] ํŠน์ˆ˜๋ฌธ์ž์ฝ”๋“œํ‘œ
ยท
Languages/Html
ํŠน์ˆ˜๋ฌธ์ž ์•„์Šคํ‚ค์ฝ”๋“œ ๋ฌธ์ž์ถœ๋ ฅ์ฝ”๋“œ " " " ' ' ' & & & > > ¡ ¡ ¡ ¢ ¢ ¢ £ £ £ ¤ ¤ ¤ ¥ ¥ ¥ ¦ ¦ ¦ § § § ¨ ¨ ¨ © © © ª ª ª « « « ¬ ¬ ¬ ­­ ­ ­ ® ® ® ¯ ¯ ¯ ° ° ° ± ± ± ² ² ² ³ ³ ³ ´ ´ ´ µ µ µ ¶ ¶ ¶ · · · ¸ ¸ ¸ ¹ ¹ ¹ º º º » » » ¼ ¼ ¼ ½ ½ ½ ¾ ¾ ¾ ¿ ¿ ¿ × × × ÷ ÷ ÷ À À À Á Á Á Â Â Â Ã Ã Ã Ä Ä Ä Å Å Å Æ Æ Æ Ç Ç Ç È È È É É É Ê Ê Ê Ë Ë Ë Ì Ì Ì Í Í Í Î Î Î Ï Ï Ï Ð Ð Ð Ñ Ñ Ñ Ò Ò Ò Ó Ó Ó Ô Ô Ô Õ Õ Õ Ö Ö Ö Ø Ø Ø Ù Ù Ù ..
[JAVA]ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ์›ํ•˜๋Š” ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜
ยท
Languages/JAVA
/** * ํ•ด๋‹น ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ์›ํ•˜๋Š” ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜์‹œํ‚จ๋‹ค. * \r\n์ผ๊ฒฝ์šฐ \r์€ ๋ฌด์กฐ๊ฑด ๋ฐ˜ํ™˜ํ•˜๋Š” ๋ฌธ์ž์—ด์—์„œ skipํ•œ๋‹ค. * @param str * @param speChar * @param convertStr * @return */ public static String convertSpecialCharToHtml(String str,char speChar, String convertStr){ String finishStr = ""; int strLeng = str.length(); StringBuffer convertBuff = new StringBuffer(strLeng+50); for(int i=0;i
[java]ํŠน์ˆ˜๋ฌธ์ž์˜ ์กด์žฌ์—ฌ๋ถ€
ยท
Languages/JAVA
/** * \r\n์˜ ์กด์žฌ ์—ฌ๋ถ€๋ฅผ ์ฐพ๋Š”๋‹ค๋ฉด \n๋งŒ ์ž…๋ ฅ * @param str * @param speChar * @return ์กด์žฌํ• ๊ฒฝ์šฐ true */ public static boolean existSpecialCharToHtml(String str, char speChar){ boolean isExist = false; int strLeng = str.length(); for(int i=0;i
[javascript] ๋…„์›”์ผ(YYYYMMDD) ์ฒดํฌ
ยท
Languages/JavaScript
function isDateYmd(sYmd) { if(isEmpty(sYmd) || sYmd.length < 8) { return false; } var dateArr = new Array(); dateArr[0] = dateStr.substring(0,3); dateArr[1] = dateStr.substring(3,5); dateArr[2] = dateStr.substring(5,7); var dateYmd = new Date(dateArr[0], dateArr[1], dateArr[2]); if( dateArr[0] == dateYmd.getFullYear() && dateArr[1] == dateYmd.getMonth() && dateArr[2] == dateYmd.getDate() ) { ret..
[javascript] ์‹œ๋ถ„์ดˆ์— ํŠน์ • ๋ฌธ์ž ๋„ฃ๊ธฐ
ยท
Languages/JavaScript
//example HH:MM:SS ๊ทธ๋ฆฌ๊ณ ... 12์‹œ๊ฐ„ ํ˜•ํƒœ๋กœ ๋ณ€๊ฒฝ function HHMMssInsertChar(HHMMss, character){ if(6 == HHMMss.length){ splitHH = HHMMss.substring(0,2); splitMM = HHMMss.substring(2,4); splitSS = HHMMss.substring(4,6); if(12 < (splitHH*1)){ splitHH = ((splitHH*1)-12)+''; } HHMMss = splitHH+character+splitMM+character+splitSS; } return HHMMss; } argument 1 : ์‹œ๋ถ„์ดˆ ํ˜•ํƒœ์˜ ๋ฌธ์ž์—ด alrgument 2 : ์‹œ๋ถ„์ดˆ ์‚ฌ์ด์— ๋„ฃ์–ด์ค„ ๋ฌธ์ž ์ถ”๊ฐ€๋กœ 24ํ˜•ํƒœ๋ฅผ..
[Javascript] ์ •๊ทœ์‹์„ ์ด์šฉํ•œ ๋ฌธ์ž์—ด์˜ ๋งจ ์•ž 0 ์ œ๊ฑฐ
ยท
Languages/JavaScript
str = str.replace(/^0/,'');
[javascript] ์‹ค์‹œ๊ฐ„ ๊ฐ’ ๋ณ€๊ฒฝ
ยท
Languages/JavaScript
0