Skip to content

Instantly share code, notes, and snippets.

@sjyun
sjyun / gist:ff2dc08ba0188bbf37ef
Created May 13, 2014 05:21
java8 interface default method 사용
public interface Student {
default void readBook(){
System.out.println("reading book");
}
}
//interface use class
public class GoSam implements Student {
public static void main(String ar[]){
GoSam gosam = new GoSam();
gosam.readBook();
}
}
@sjyun
sjyun / gist:efb5a27b27c0505b5bfc
Created June 19, 2014 04:15
backbone model 실습
<!DOCTYPE html>
<html>
<head>
<title>ttttttttttt</title>
<script src="./lib/json2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="./lib/underscore.js"></script>
@sjyun
sjyun / collection
Created June 19, 2014 05:41
collection실습
<!DOCTYPE html>
<html>
<head>
<title>collection</title>
<script src="./lib/json2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="./lib/underscore.js"></script>
<script src="./lib/mustache.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>collection</title>
<script src="./lib/json2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="./lib/underscore.js"></script>
<script src="./lib/mustache.js"></script>
@sjyun
sjyun / router
Created June 19, 2014 06:19
router 실습
<!DOCTYPE html>
<html>
<head>
<script src="./lib/json2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="./lib/underscore.js"></script>
<script src="./lib/mustache.js"></script>
<script type="text/javascript" src="./lib/backbone.js"> </script>
<title></title>
</head>
@sjyun
sjyun / index.html
Created August 1, 2014 11:29
스터디 실습용 예제파일
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Backbone.js Book Library</title>
<link rel="stylesheet" type="text/css" href="css/screen.css">
</head>
<body>
@sjyun
sjyun / gist:8b83c11c3b82d418bd59
Created August 1, 2014 18:58
js객체생성시 문제
<!--
맴버변수를 this를 사용해서 선언했기 때문에
외부에서도 접근이 가능하다.
-->
<script type="text/javascript">
function Tune(song, artist){
this.title = song;
this.aritist = artist;
this.concat = function(){
@sjyun
sjyun / gist:4f7fde0d7a23eeeca1cb
Created August 2, 2014 01:25
this를 지우면 window 전역에서 호출되지 않는다.
<script type="text/javascript">
function Tune(song, artist){
var title = song;
var aritist = artist;
this.concat = function(){
return title + " " + aritist;
}
}
window.onload = function(){
public class Test2 {
public static void main(String ar[]){
Runnable r1 = new Runnable() {
@Override
public void run() {
System.out.println("old Java way");
}
};