public abstract class UserDao { public void add(User user) throws ClassNotFoundException, SQLException { Connection c = getConnection(); PreparedStatement ps = c.prepareStatement( "insert into users(id, name, password) values(?,?,?)"); ps.setString(1, user.getId()); ps.setString(2, user.getName()); ps.setString(3, user.getPassword()); ps.executeUpdate(); ps.close(); c.close(); } public User get(..
public void add(User user) throws ClassNotFoundException, SQLException { Class.forName("com.mysql.jdbc.Driver"); Connection c = DriverManager.getConnection("jdbc:mysql://localhost/springbook?characterEncoding=UTF-8", "spring", "book"); PreparedStatement ps = c.prepareStatement( "insert into users(id, name, password) values(?,?,?)"); ps.setString(1, user.getId()); ps.setString(2, user.getName());..
스프링이란? 자바 엔터프라이즈 어플리케이션 개발을 훨씬 빠르고 효율적으로 할 수 있도록 틀과 프로그래밍 모델 기술 API등을 제공해주는것. 스프링 어플리케이션 기본 틀 - 스프링 컨테이너 스프링 핵심 프로그래밍 모델 - IoC/DI, 서비스추상화, AOP 스프링 기술 API - 다양한 영역에 바로 활용할 수 있도록 제공되는 API (비즈니스, 도메인, 웹...) 스프링을 사용한다는 것은 위 세가지 요소를 이해하고, 적극적으로 활요하여 어플리케이션을 개발한다는 것이다.
public class Mergesort { static int data[] = {15,45,32,12,68,653,34,21}; public static void main(String[] args) { // TODO Auto-generated method stub mergeSort(data, 0, data.length-1); printdata(); } private static void printdata() { for (int i = 0; i < data.length; i++) { System.out.print(data[i] + " "); } } private static void mergeSort(int[] data, int p, int r) { if (p < r) { int q = (p + r) /..
Custom ListView with multiple click in widgets with holder Hello Friends, Today I am sharing new tutorial for clicking multiple widgets on a single list view item. Create a new project in the activity_main.xml,copy the below code: Now create a new xml layout named : row_layout.xml. And copy the below code in that: Then move to the src folder in that make an adapter named CustomListAdapter.java ,..
Custom SeekBar for lower versions Custom SeekBar with the holo theme for lower versions of android Hello Coders, Today I am sharing the tutorial for custom seek bar (see snapshot) for lower versions(>2.2) with some small steps .Firstly copy the below images into your drawable folder: save these images and rename it with the following name: red_scrubber_control_disabled_holo.png red_scrubber_cont..
커스텀 SeekBar를 만들때 thumb, progress style을 을 적용시키려면 먼저 xml파일을 만들어야한다. shape.xml 파일을 res/drawable 폴더에 넣는다. progress.xml seekbar에 적용 출처=http://www.worldbestlearningcenter.com/tips/Android-custom-SeekBar.htm
정규표현식의 기초정규표현식에서 사용하는 메타문자(metacharacters)에는 다음과 같은 것들이 있다.. ^ $ * + ? { } [ ] \ | ( )정규표현식에 위 메타문자들이 사용되면 이것들은 특별한 의미를 갖게 된다. 이것들에 대해서 모두 알아보는 것이 바로 우리의 목표가 될 것이다.자, 이제 가장 간단한 정규표현식부터 시작해 보기로 하자.문자클래스(character class, [])우리가 가장 먼저 살펴 볼 메타문자는 바로 문자클래스(character class)인 [] 이다.문자클래스를 만드는 메타문자인 [와 ] 사이에는 어떤 문자도 들어갈 수 있다. 문자클래스로 만들어진 정규식은 "[과 ]사이의 문자들과 매치"라는 의미를 갖는다.즉, 정규 표현식이 [abc]와 같다면 이 표현식의 의미는 ..
2가지방법1. Sys 경로 추가>>> import sys>>>sys.pathsys.path에서는 파이썬 라이브러리들이 설치 되어있는 디렉토리를 보여주며, 이곳에 만들어 놓은 모듈이 있는 디렉토리 경로를 적어주면 끝>>>sys.path.append("해당경로") 2. PYTHONPATH 환경변수 설정 set PYTHONPATH=해당경로 set명령어를 이용하여 경로추가!
SyntaxError: Non-ASCII Character코드내에 한글을 파이썬이 읽들이지 못할때 발생하는 에러 # -*- coding: utf-8 -*- 코드의 첫줄에 추가하자~
task deleteOldJar(type: Delete) { delete 'build/libs/AndroidPlugin.jar'}task exportJar(type: Copy) { from('build/intermediates/bundles/release/') into('release/') //경로 include('classes.jar') ///Give whatever name you want to give rename('classes.jar', 'AndroidPlugin.jar')} exportJar.dependsOn(deleteOldJar, build) build 에 추가 하여 jar만듬
http://eigo.co.uk/labs/lock-screen-orientation-in-android/