This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples.android.sqlite; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyBean{ | |
private static MyBean instance = new MyBean(); | |
private MyBean(){} | |
public static MyBean getInstance(){ | |
return instance; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); | |
builder.setMessage("OK를 누르시겠습니까?") | |
.setTitle("Alert Dialog") | |
.setPositiveButton("확인", new DialogInterface.OnClickListener() { | |
// 확인 버튼 클릭시 설정 | |
public void onClick(DialogInterface dialog, int whichButton) { | |
Toast.makeText(MainActivity.this, "OK 버튼 클릭", Toast.LENGTH_SHORT).show(); | |
} | |
}) | |
.setNegativeButton("취소", new DialogInterface.OnClickListener() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function LottoMachine(){ | |
this.balls = Array(45); | |
this.mix = function(){ | |
for(var i = 0; i < 45; i++){ | |
this.balls[i] = i+1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function Stack(){ | |
this.array = new Array(); | |
this.push = function(element){ | |
this.array.push(element); | |
} | |
this.pop = function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function Student(name, kor){ | |
this.name = name; | |
this.kor = kor; | |
} | |
var array = new Array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function LottoMachine(){ | |
this.balls = Array(45); | |
this.mix = function(){ | |
for(var i = 0; i < 45; i++){ | |
this.balls[i] = i+1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<script> | |
function LottoMachine(){ | |
var balls; | |
var mixFlag = false; | |
this.setBalls = function(ballsParam){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script src="http://code.jquery.com/jquery-1.10.2.js"></script> | |
<script> | |
$(document).ready(function () { | |
var date = new Date(); | |
var currentYear = date.getFullYear(); | |
var currentMonth = date.getMonth() + 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jquery에서 선택자를 이용하여 찾은 결과에 함수를 호출하기 위하여 | |
// $.fn 객체에 메소드를 추가하였다. | |
// $('div').currentCalendar(); | |
// 라고 하면 달력이 div tag에 추가되서 보여진다. | |
$.fn.currentCalendar = function(options){ | |
var date = new Date(); | |
var currentYear = date.getFullYear(); | |
var currentMonth = date.getMonth() + 1; | |
date.setDate(1); | |
// 0:일요일, 6:토요일 |
OlderNewer